home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Reference / the cmsp digests ('94-'97) / csmp digest Vol 4 No 025 < prev    next >
Text File  |  1996-11-26  |  162KB  |  4,687 lines

  1. C.S.M.P. Digest             Mon, 25 Nov 96       Volume 4 : Issue 25
  2.  
  3. Today's Topics:
  4.  
  5.         Anyone doing a GNU gcc port to the CW IDE?
  6.         C++ Memory Questions
  7.         Determining current "enterable" object in dialog?
  8.         Drag Manager question
  9.         FSpGetFInfo for directories?
  10.         Forcing EPS font download
  11.         GIF conversion
  12.         GWorlds and Graphic devices
  13.         GetResource and temporary memory
  14.         Gettings click coordinates
  15.         Help with coding paint fill function
  16.         Memory Usage Reporter Utility?
  17.         Native JAVA on Macintosh?
  18.         PBCatSearch
  19.         PEF file format documentation required
  20.         PICT or Image manipulation libraries
  21.         Path to the preferences folder ?
  22.         Problem w- PICT resource
  23.         Questions about shareware copyrights
  24.         QuickBASIC can't handle 32bit adressing
  25.         SpriteWorld 2 kludges and add-ons
  26.         String concatenation to pass to DrawString
  27.         SysBeep and PMac
  28.         THPrint fields for Laserwriter 8?
  29.         Time Manager Question...
  30.         Using a ditl as a template
  31.         What is the reference of the book of Motorola on the 68000 family?
  32.         [Q] AEInstallEventHandler breaks under PPC
  33.         [Q] Displaying only folders in a Standard Get File
  34.         [Q] How can I get a file's creator?
  35.         [q] C: putting int into dialog
  36.         accelerated code resource
  37.         resedit & PICT resources: help?
  38.  
  39.  
  40.  
  41. The Comp.Sys.Mac.Programmer Digest is moderated by Mark Aiken
  42. (marka@ee.mcgill.ca).
  43.  
  44. The digest is a collection of article threads from the internet
  45. newsgroups comp.sys.mac.programmer.help, csmp.tools, csmp.misc and
  46. csmp.games. It is designed for people who read news semi-regularly and
  47. want an archive of the discussions.  If you don't know what a
  48. newsgroup is, you probably don't have access to it. Ask your systems
  49. administrator(s) for details. If you don't have access to news, you
  50. may still be able to post messages to the group by using a mail server
  51. like anon.penet.fi (mail help@anon.penet.fi for more information).
  52.  
  53. Each issue of the digest contains one or more sets of articles (called
  54. threads), with each set corresponding to a 'discussion' of a particular
  55. subject.  The articles are not edited; all articles included in this digest
  56. are in their original posted form (as received by our news server at
  57. ee.mcgill.ca).  Article threads are not added to the digest until the last
  58. article added to the thread is at least two weeks old (this is to ensure that
  59. the thread is dead before adding it to the digest).  Article threads that
  60. consist of only one message are generally not included in the digest.
  61.  
  62. The digests can be obtained by email, ftp or through the World Wide Web.
  63.  
  64. If you want to receive the digest by mail, send email to 
  65. majordomo@ee.mcgill.ca with no subject and one of the following commands
  66. as body:
  67.  
  68.     help                        Sends you a summary of commands
  69.     subscribe csmp                      Adds you to the mailing list
  70.     unsubscribe csmp                    Removes you from the list
  71.  
  72. Once you have subscribed, you will automatically receive each new
  73. issue as it is created.
  74.  
  75. Back issues are available by ftp from Info-Mac mirror sites in the
  76. per/csmp subdirectory, e.g.
  77.  
  78.   ftp://sumex-aim.stanford.edu/info-mac/per/csmp/
  79.  
  80. The contents of all back issues can be searched by accessing the
  81. following URL, courtesy of Andrew Barry (ajbarry@ozemail.com.au):
  82.  
  83.     http://marvin.stattech.com.au/search.html
  84.  
  85. They can also be searched through the following URLs, thanks to
  86. Tim Tuck (Tim.Tuck@sensei.com.au):
  87.  
  88.     http://wais.sensei.com.au/searchform.html
  89.     wais://wais.sensei.com.au:210/csmp?
  90.  
  91. -------------------------------------------------------
  92.  
  93. >From bthompso@teleport.com (benjamin thompson)
  94. Subject: Anyone doing a GNU gcc port to the CW IDE?
  95. Date: Sat, 02 Nov 1996 15:08:15 -0700
  96. Organization: coenobyte software
  97.  
  98. Has anyone investigated doing a gcc port to the CW IDE? Is development
  99. active? ie can I assist a current effort or help start one?
  100.  
  101. cheers. -ben.
  102.  
  103. +++++++++++++++++++++++++++
  104.  
  105. >From vince@das.harvard.edu (Vince Darley)
  106. Date: Sun, 03 Nov 1996 15:56:10 -0500
  107. Organization: Harvard University
  108.  
  109. In article <bthompso-ya023180000211961508150001@nntp.teleport.com>,
  110. bthompso@teleport.com (benjamin thompson) wrote:
  111.  
  112. >Has anyone investigated doing a gcc port to the CW IDE? Is development
  113. >active? ie can I assist a current effort or help start one?
  114. >
  115. >cheers. -ben.
  116.  
  117. I'd try contacting Stan Shebs at Cygnus.  He recently released a couple of
  118. early  beta versions of gcc for MPW.
  119.  
  120. -- 
  121.     -********* *-
  122.    -*  Vince  *-
  123.   -* *********-
  124.    
  125. <http://www.fas.harvard.edu/~darley/>
  126.  
  127. +++++++++++++++++++++++++++
  128.  
  129. >From I_hate@being.spammed.com (STOP SPAMMING ME)
  130. Date: 4 Nov 1996 18:21:06 GMT
  131. Organization: There shall be revenge!!!!
  132.  
  133. In article <bthompso-ya023180000211961508150001@nntp.teleport.com>,
  134. bthompso@teleport.com (benjamin thompson) wrote:
  135.  
  136. > Has anyone investigated doing a gcc port to the CW IDE? Is development
  137. > active? ie can I assist a current effort or help start one?
  138. > cheers. -ben.
  139.  
  140. I do not know, but that would be most cool!!!
  141.  
  142.  -jm (gimic@best.com)
  143.  
  144. -- 
  145. #############################################################
  146. # My opinions are my own and not of any I work for.         #
  147. # I do not want any advertisement so do not send me email.  #
  148. #############################################################
  149.  
  150. +++++++++++++++++++++++++++
  151.  
  152. >From Raphael Schumacher <schumacherr@vptt.ch>
  153. Date: 6 Nov 1996 06:43:02 GMT
  154. Organization: Swiss Telecom
  155.  
  156. Having GNU's gcc on CodeWarrior as a cross-compiler, generating code for
  157. various UNIX systems (e.g. HP-UX), would be giga-cool!
  158.  
  159. Why: currently I'm editing C++ source with BBEdit/CodeWarrior and compile
  160. it on our HP-UX 9.05 based test system - why not doing both on the Mac
  161. with CodeWarrior?
  162.  
  163. RAPHAEL
  164.  
  165.   _________________________________________________________________
  166. | RAPHAEL J. SCHUMACHER             Swiss Telecom, R&D 64           |
  167. | schumacherr@vptt.ch               Zentweg 25c, CH-3000 BERNE 29   |
  168. | Tel. +41 31 338 46 59             Fax. +41 31 338 99 04           |
  169.   _________________________________________________________________
  170.  
  171. +++++++++++++++++++++++++++
  172.  
  173. >From Manuel Veloso <veloso@apix.com>
  174. Date: 4 Nov 1996 05:40:53 GMT
  175. Organization: Active Paper, Inc.
  176.  
  177. In article <bthompso-ya023180000211961508150001@nntp.teleport.com>
  178. benjamin thompson, bthompso@teleport.com writes:
  179. >Has anyone investigated doing a gcc port to the CW IDE? Is development
  180. >active? ie can I assist a current effort or help start one?
  181.  
  182. Stan shebs released an early beta of gcc 2.7(?) a few weeks ago.
  183. The source is available, so you could probably just grab it
  184. and go. From what I remember of the older gcc's, it won't
  185. be a trivial port.
  186. - ---------------------------------------
  187. Manny Veloso            Digital Plumber
  188. Active Paper, Inc.      http://www.apix.com
  189. veloso@apix.com (work)  veloso@pobox.com
  190. - ---------------------------------------
  191. "the wheel of Karma turns slowly,
  192. but it is accurate to the least significant bit."
  193.  
  194. +++++++++++++++++++++++++++
  195.  
  196. >From u7g11ao@sunmail.lrz-muenchen.de (Thomas Engelmeier)
  197. Date: Tue, 5 Nov 1996 18:19:33 +0100
  198. Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
  199.  
  200. Manuel Veloso <veloso@apix.com> wrote:
  201.  
  202. > From what I remember of the older gcc's, it won't
  203. > be a trivial port.
  204.  
  205. Well, non-reentrant stuff is a great mess to adapt. My not-released-yet
  206. CW (Microcontroller) CrossAssembler plugin was like hell to port, I can
  207. tell you. By now, I've to implement the Linker, the real ugly stuff is
  208. done <g>..
  209.  
  210. Ciao,
  211.      TomE
  212. - --
  213. u7g11ao@sunmail.lrz-muenchen.de
  214.  
  215. +++++++++++++++++++++++++++
  216.  
  217. >From mwherter@waterw.com (Dave McWherter)
  218. Date: Thu, 07 Nov 1996 06:49:28 -0400
  219. Organization: Water Wheel Systems, Marlton, NJ
  220.  
  221. In article <55pc1m$2lo@news.vptt.ch>, Raphael Schumacher
  222. <schumacherr@vptt.ch> wrote:
  223.  
  224. > Having GNU's gcc on CodeWarrior as a cross-compiler, generating code for
  225. > various UNIX systems (e.g. HP-UX), would be giga-cool!
  226.  
  227. I've seen numerous posts saying how 'cool' it would be to have GCC linked
  228. up to CodeWarrior, and find it interesting, to say the least. It's not an
  229. easy thing to do, and a Mac GCC port to MPW has already been done by a
  230. fellow named Shebs (I think that's his name) at Cygnus. I haven't tried to
  231. get it working yet, as I'm not an MPW user, but it looks like a tough job
  232. to me. But it still looks simpler than hooking GCC to CodeWarrior...
  233.  
  234. I say that because I have GCC running as a CodeWarrior project for three
  235. different targets - the 6502, the Hitachi SH2/3, and a propietary
  236. processor here at Franklin. They all work fine for my purposes, which is
  237. generating assembly code only - assembly and linking and debugging are
  238. done outside of CodeWarrior (although using tools which are CodeWarrior
  239. projects). I've toyed with the idea of converting GCC to a CodeWarrior
  240. plug-in and see only one major obstacle to doing that which could probably
  241. be solved with some help from the Metrowerks people - the fact that GCC
  242. needs to run from an initialized state for each file it compiles. The GCC
  243. code assumes that most of its major variables (including its memory heap)
  244. are initialized in the standard C fashion before each file, because that
  245. is how it's typically used - load/run/compile one file, repeat, etc. So
  246. the plug-in handler would have to flush and reload/re-initialize the
  247. compiler for every file compiled.
  248.  
  249. Actually, now that I think about it, there's another problem - I run the
  250. GCC pre-processor (another CW project) on all my files first. The
  251. pre-processor and compiler projects would have to be merged to make the
  252. plug-in, but I don't think that would be too difficult.
  253.  
  254. Assuming that these problems could be solved, you'd be able to compile
  255. using GCC from a CodeWarrior project for any of the three targets I've got
  256. working (two of which are probably useless to anybody else). I would
  257. estimate that you could probably get any one of the other supported GCC
  258. targets (and there are many) running with a few days worth of work. (It
  259. took me a day to bring up the Hitachi, although it still crashes at -O2.)
  260. I've got the GCC target generation stuff as a CW project too. There is a
  261. GCC port to the Power PC, but I don't know if it will generate code
  262. suitable for the Mac environment. If it doesn't, then that is more work
  263. that would need to be done.
  264.  
  265. But even if you did all that, you still have no GCC assembler or linker.
  266. These require a lot of work, which appears to have already been done by
  267. Shebs for MPW. And even then, I don't think you can build a Mac
  268. application with it. (Apologies if I'm wrong on that.) So I've pretty much
  269. decided that it's not worth it for me to do much more with it, although it
  270. may be for someone else.
  271.  
  272. Dave_Mcwherter@Franklin.com
  273.  
  274. +++++++++++++++++++++++++++
  275.  
  276. >From Steven Kortze <skortze@erols.com>
  277. Date: Thu, 07 Nov 1996 20:46:49 +0000
  278. Organization: Erol's Internet Services
  279.  
  280. Dave McWherter wrote:
  281. > In article <55pc1m$2lo@news.vptt.ch>, Raphael Schumacher
  282. > <schumacherr@vptt.ch> wrote:
  283. > > Having GNU's gcc on CodeWarrior as a cross-compiler, generating code for
  284. > > various UNIX systems (e.g. HP-UX), would be giga-cool!
  285. > >
  286. > I've seen numerous posts saying how 'cool' it would be to have GCC linked
  287. > up to CodeWarrior, and find it interesting, to say the least. It's not an
  288. > easy thing to do, and a Mac GCC port to MPW has already been done by a
  289. > fellow named Shebs (I think that's his name) at Cygnus. I haven't tried to
  290. > get it working yet, as I'm not an MPW user, but it looks like a tough job
  291. > to me. But it still looks simpler than hooking GCC to CodeWarrior...
  292. > ....
  293. >
  294. > But even if you did all that, you still have no GCC assembler or linker.
  295. > These require a lot of work, which appears to have already been done by
  296. > Shebs for MPW. And even then, I don't think you can build a Mac
  297. > application with it. (Apologies if I'm wrong on that.) So I've pretty much
  298. > decided that it's not worth it for me to do much more with it, although it
  299. > may be for someone else.
  300.  
  301. >From my rather brief understanding of GCC:
  302. Preprocessor -> compiler (to assembly language) -> assembler ....
  303.  
  304. Stan Shebs had some brief documentation on a earlier version of his MPW
  305. port of GCC on the MacHack "Late Night with MacHack" CDROM. Actually,
  306. the process GCC uses bears some resemblence to the Motorola compiler,
  307. since Motorola's compiler started life as a AIX PowerPC based compiler.
  308. [See MacTech articles in the June and October 1996 issues]. Short of
  309. writing your own assembler, you could have a problem. Motorola solved
  310. the problem by using a shared library which did initialization,
  311. conversion to assembly and assembling to object code (XCOFF). The XCOFF
  312. code was then imported via a Metrowerks ImportXCOFF library function.
  313.  
  314. In another issue of MacTech, Metrowerks folks mentioned the future
  315. ability to pass the results of one tool to another. I believe that this
  316. is beginning to be implemented in CW10 with Linkers and Post-linkers.
  317. Not quite the same as compilers though.
  318.  
  319. CW port of GCC is an ambitious project, but one that has possibilities.
  320. I would suggest the documentation from the MacHack CD and the two
  321. MacTech articles for more information.
  322.  
  323. Thanks,
  324. Steve
  325.  
  326. +++++++++++++++++++++++++++
  327.  
  328. >From u7g11ao@sunmail.lrz-muenchen.de (Thomas Engelmeier)
  329. Date: Thu, 7 Nov 1996 08:19:54 +0100
  330. Organization: Leibniz-Rechenzentrum, Muenchen (Germany)
  331.  
  332. Dave McWherter <mwherter@waterw.com> wrote:
  333.  
  334. > In article <55pc1m$2lo@news.vptt.ch>, Raphael Schumacher
  335. > <schumacherr@vptt.ch> wrote:
  336.  
  337. > be solved with some help from the Metrowerks people - the fact that GCC
  338. > needs to run from an initialized state for each file it compiles. The GCC
  339. > code assumes that most of its major variables (including its memory heap)
  340. > are initialized in the standard C fashion before each file, because that
  341. > is how it's typically used - load/run/compile one file, repeat, etc. So
  342. > the plug-in handler would have to flush and reload/re-initialize the
  343. > compiler for every file compiled.
  344.  
  345. It took me about one day to "fix this featuere" on my CrossAssembler,
  346. which uses an Yacc generated Parser with the same problem: 
  347.  
  348. I collected all globals / statics in one file and added an
  349. InitYaccGlobals() and an InitLexerGlobals() before each file my plugin
  350. compiles.
  351.   
  352.  
  353. > Actually, now that I think about it, there's another problem - I run the
  354. > GCC pre-processor (another CW project) on all my files first. The
  355. > pre-processor and compiler projects would have to be merged to make the
  356. > plug-in, but I don't think that would be too difficult.
  357.  
  358. Also not too hard: 
  359. as Yacc doesn't support #includes, I wrote  an preprocessor plugin which
  360. just ##includes common yacc code.yh for different assembler targets.
  361. The to be precompiled stuff has to be further up on the project,
  362. modification date caching doesn't work for me, and the modification date
  363. check for my .yh include files is not too good. Besides that, it's just
  364. fine.
  365.   
  366. > But even if you did all that, you still have no GCC assembler or linker.
  367.  
  368. And if you translate the GCC Link format to one MWs Linker can handle? 
  369.  
  370. Ciao, 
  371.      TomE
  372. - --
  373. u7g11ao@sunmail.lrz-muenchen.de
  374.  
  375. ---------------------------
  376.  
  377. >From rajadhyaksha.2@osu.edu (Ram)
  378. Subject: C++ Memory Questions
  379. Date: Fri, 08 Nov 1996 00:39:38 -0500
  380. Organization: The Ohio State University
  381.  
  382. Hey, I need some help writing actual decent C++ code on the Mac. I haven't
  383. found any good C++ books that deal with:
  384.  
  385. 1. When things get FUBARed upon object construction.
  386. 2. Allocating object memory yourself
  387.  
  388. The only solution I've found to 1 is to add two extra wrapper init/destroy
  389. functions that I call after I instantiate an object and before I delete
  390. it. Like this:
  391.  
  392. Object()
  393. InitMyObject()
  394. DeleteMyObject()
  395.  
  396. Of course, the first 2 are the mandatory constructor/destructor but they
  397. do little more than init variables. I keep all the code that can fail (ie.
  398. memory allocation, Toolbox stuff) in my InitMyObject() function because if
  399. it fails, I can return an error and then delete the object.
  400.  
  401. Of course, you could try putting all your initialization stuff in the
  402. constructor and throw an exception when something goes wrong but how does
  403. your exception handler know whether or not the object was created so it
  404. can safely delete it, etc? 
  405.  
  406. The second question is simple. If I want to create an array of objects,
  407. how can do it with an already existing buffer? If I do something like
  408. this:
  409.  
  410. myBuffer = NewPtr(10 * sizeof(myObject));
  411.  
  412. and now I want to "initialize" this with 10 objects, what do I do? I
  413. remember there being a placement new function but none of my books
  414. document it. I'm assuming I can't call the constructor directly (ie.
  415. ((myObject *)myBuffer)[1].myObject) because this would be too easy. And
  416. also, I'm assuming that sizeof() will return the correct byte size of all
  417. the member variables + vtable crap. And would I have to explicitly call
  418. the destructor when I dispose the buffer?
  419.  
  420. Anyways, any help is greatly suggested. I've become quite discouraged in
  421. trying to produce code that is as elegant and reliable as stuff I can do
  422. in C.
  423.  
  424. --Ram
  425.  
  426. +++++++++++++++++++++++++++
  427.  
  428. >From l41188@alfa.ist.utl.pt (Paulo Casanova)
  429. Date: Fri, 08 Nov 1996 17:45:47 +0000
  430. Organization: Instituto Superior Tecnico 
  431.  
  432. In article <rajadhyaksha.2-0811960040090001@206.244.42.138>,
  433. rajadhyaksha.2@osu.edu (Ram) wrote:
  434.  
  435. > Hey, I need some help writing actual decent C++ code on the Mac. I haven't
  436. > found any good C++ books that deal with:
  437. > 1. When things get FUBARed upon object construction.
  438. > 2. Allocating object memory yourself
  439. > The only solution I've found to 1 is to add two extra wrapper init/destroy
  440. > functions that I call after I instantiate an object and before I delete
  441. > it. Like this:
  442. > Object()
  443. > ~Object()
  444. > InitMyObject()
  445. > DeleteMyObject()
  446. > Of course, the first 2 are the mandatory constructor/destructor but they
  447. > do little more than init variables. I keep all the code that can fail (ie.
  448. > memory allocation, Toolbox stuff) in my InitMyObject() function because if
  449. > it fails, I can return an error and then delete the object.
  450. > Of course, you could try putting all your initialization stuff in the
  451. > constructor and throw an exception when something goes wrong but how does
  452. > your exception handler know whether or not the object was created so it
  453. > can safely delete it, etc?
  454.  
  455.    I'm not a C++ gur, but I suppose either the new operator catches
  456. exceptions and deletes your object...
  457.  
  458.  
  459. > The second question is simple. If I want to create an array of objects,
  460. > how can do it with an already existing buffer? If I do something like
  461. > this:
  462. > myBuffer = NewPtr(10 * sizeof(myObject));
  463. > and now I want to "initialize" this with 10 objects, what do I do? I
  464. > remember there being a placement new function but none of my books
  465. > document it. I'm assuming I can't call the constructor directly (ie.
  466. > ((myObject *)myBuffer)[1].myObject) because this would be too easy. And
  467. > also, I'm assuming that sizeof() will return the correct byte size of all
  468. > the member variables + vtable crap. And would I have to explicitly call
  469. > the destructor when I dispose the buffer?
  470.  
  471.    You can call the constructor manually:
  472.  
  473.    for( n = 0; n < NUMBER_OBJECTS; n++ )
  474.    {
  475.          (( myObject * )myBuffer + n)->myObject();
  476.    }
  477.  
  478.    and the destructor manually. After use DisposePtr to dispose the objects...
  479.  
  480.  
  481. > Anyways, any help is greatly suggested. I've become quite discouraged in
  482. > trying to produce code that is as elegant and reliable as stuff I can do
  483. > in C.
  484. > --Ram
  485.  
  486.  
  487. Paulo
  488.  
  489. +++++++++++++++++++++++++++
  490.  
  491. >From Chelly Green <chelly@eden.com>
  492. Date: Sun, 10 Nov 1996 00:57:12 -0600
  493. Organization: -
  494.  
  495. Paulo Casanova wrote:
  496. > In article <rajadhyaksha.2-0811960040090001@206.244.42.138>,
  497. > rajadhyaksha.2@osu.edu (Ram) wrote:
  498. > > Hey, I need some help writing actual decent C++ code on the Mac. I haven't
  499. > > found any good C++ books that deal with:
  500. > >
  501. > > 1. When things get FUBARed upon object construction.
  502. > > 2. Allocating object memory yourself
  503.  
  504. I suggest you check the C++ FAQ. It probably explains these.
  505.  
  506.     http://www.cerfnet.com/~mpcline/C++-FAQs-Lite/
  507.  
  508. (OK, so it turns out I typed alot of code to demonstrate the second
  509. item. Read on!)
  510.  
  511. > > The only solution I've found to 1 is to add two extra wrapper init/destroy
  512. > > functions that I call after I instantiate an object and before I delete
  513. > > it. Like this:
  514. > >
  515. > > Object()
  516. > > ~Object()
  517. > > InitMyObject()
  518. > > DeleteMyObject()
  519. > >
  520. > > Of course, the first 2 are the mandatory constructor/destructor but they
  521. > > do little more than init variables. I keep all the code that can fail (ie.
  522. > > memory allocation, Toolbox stuff) in my InitMyObject() function because if
  523. > > it fails, I can return an error and then delete the object.
  524. > >
  525. > > Of course, you could try putting all your initialization stuff in the
  526. > > constructor and throw an exception when something goes wrong but how does
  527. > > your exception handler know whether or not the object was created so it
  528. > > can safely delete it, etc?
  529.  
  530. See the C++ FAQ:
  531.  
  532.    
  533. http://www.cerfnet.com/~mpcline/C++-FAQs-Lite/freestore-mgmt.html#[16.9]
  534.  
  535. >    I'm not a C++ gur, but I suppose either the new operator catches
  536. > exceptions and deletes your object...
  537.  
  538. Basically, yes, beacause the user otherwise has no way of freeing the
  539. allocated memory, or calling the destructor, nor should they have to
  540. worry about that.
  541.  
  542. > > The second question is simple. If I want to create an array of objects,
  543. > > how can do it with an already existing buffer?
  544.  
  545. First question, why? Do you want to provide your own allocator for the
  546. class? The language allows you to do that without affecting how users
  547. create your objects.
  548.  
  549. > >If I do something like
  550. > > this:
  551. > >
  552. > > myBuffer = NewPtr(10 * sizeof(myObject));
  553. > >
  554. > > and now I want to "initialize" this with 10 objects, what do I do?
  555.  
  556. Well, I was about to say to use placement new, but I realized this was
  557. an array. Sorry, can't do that. The compiler can add any number of bytes
  558. to the space needed for the array to store the number of elements, etc.
  559. I don't think you can currently override a class-specific array
  560. allocation with Code Warrior. Oh well.
  561.  
  562. > > I
  563. > > remember there being a placement new function but none of my books
  564. > > document it. I'm assuming I can't call the constructor directly (ie.
  565. > > ((myObject *)myBuffer)[1].myObject) because this would be too easy.
  566.  
  567. Hehe, yeah. Well, actually, come to think of it, you can, in a loop
  568. using new placement. A template function will make this reusable and
  569. clear (at least to me, anyway :-). But first a normal version:
  570.  
  571.     #include <iostream.h>
  572.     #include <new.h> // for placement new
  573.  
  574.     static int obj_count = 0;
  575.  
  576.     // does checking and prints useful information
  577.     struct Trace
  578.     {
  579.         Trace* this_check;
  580.         int my_number;
  581.         Trace() : this_check( this ), my_number( ++obj_count )
  582.         {
  583.             cout << "Trace::Trace() - " << my_number << endl;
  584.         }
  585.         
  586.         ~Trace()
  587.         {
  588.             if ( this != this_check )
  589.                 cout << "bad pointer to trace object!" << endl;
  590.             this_check = 0; // invalidate it now
  591.             cout << "Trace::~Trace() - " << my_number << endl;
  592.         }
  593.     };
  594.     
  595.     const int num_objects = 4;
  596.     
  597.     void relevant_code_here( void* storage )
  598.     {
  599.         Trace* objects = (Trace*) storage;
  600.         
  601.         // construct them
  602.         for ( int i = 0; i < num_objects; ++i )
  603.             ::new (&objects [i]) Trace;
  604.         
  605.         // here you can do something with them - they are a normal array
  606.         cout << "do something interesting" << endl;
  607.         
  608.         // destruct them *in reverse order* (often important)!
  609.         for ( int i = num_objects; --i >= 0; )
  610.             objects [i].~Trace();
  611.     }
  612.     
  613.     int main()
  614.     {
  615.         // allocate space
  616.         char* storage = new char [sizeof (Trace) * num_objects];
  617.         
  618.         relevant_code_here( storage );
  619.         
  620.         // free space
  621.         delete [] storage;
  622.         
  623.         return 0;
  624.     }
  625.  
  626.     /*
  627.  
  628.     output:
  629.  
  630.         Trace::Trace() - 1
  631.         Trace::Trace() - 2
  632.         Trace::Trace() - 3
  633.         Trace::Trace() - 4
  634.         do something interesting
  635.         Trace::~Trace() - 4
  636.         Trace::~Trace() - 3
  637.         Trace::~Trace() - 2
  638.         Trace::~Trace() - 1
  639.  
  640.     seems to be working
  641.     */
  642.  
  643. Now, let's replace the construction and destruction with a template
  644. function (has to be a class currenly because Code Warrior doesn't
  645. allow explicit template arguments):
  646.  
  647.     // everything from code above *except* the function
  648. relevant_code_here()
  649.     // ...
  650.     
  651.     template<class T>
  652.         // ignore this stupid crap
  653.         class construct_array { T* ret_value;
  654.         public: operator T* () const { return ret_value; }
  655.         //
  656.     /* T* */ construct_array( void* raw_p, int size )
  657.     {
  658.         for ( T* p = ret_value = static_cast<T*> (raw_p); size; --size,
  659. ++p )
  660.             ::new (static_cast<void*> (p)) T;
  661.     }};
  662.     
  663.     template<class T>
  664.     void destruct_array( T* p, int size )
  665.     {
  666.         for ( p += size; size; --size )
  667.             (--p)->~T();
  668.     }
  669.     
  670.     void relevant_code_here( void* storage )
  671.     {
  672.         Trace* objects = construct_array<Trace>( storage, num_objects );
  673.         
  674.         // here you can do something with them - they are a normal array
  675.         cout << "do something interesting" << endl;
  676.         
  677.         destruct_array( objects, num_objects );
  678.     }
  679.  
  680.     // same output as before, seems to work OK
  681.  
  682. By the way, this code was just tested (compiled and run), so you have
  683. some chance of it working  :-)
  684.  
  685. > > And
  686. > > also, I'm assuming that sizeof() will return the correct byte size of all
  687. > > the member variables + vtable crap.
  688.  
  689. Correct.
  690.  
  691. > > And would I have to explicitly call
  692. > > the destructor when I dispose the buffer?
  693.  
  694. Yes, before you dispose it.
  695.  
  696. >    You can call the constructor manually:
  697. >    for( n = 0; n < NUMBER_OBJECTS; n++ )
  698. >    {
  699. >          (( myObject * )myBuffer + n)->myObject();
  700. >    }
  701.  
  702. No, you cannot call it with that syntax (unless a stupid compiler lets
  703. you, hint, hint...).
  704.  
  705. >    and the destructor manually. After use DisposePtr to dispose the objects...
  706.  
  707. Otherwise, yes (the posted code does this).
  708.  
  709. > > Anyways, any help is greatly suggested. I've become quite discouraged in
  710. > > trying to produce code that is as elegant and reliable as stuff I can do
  711. > > in C.
  712.  
  713. Don't worry, the language allows the same things, where possible. It is
  714. a very nice language.
  715.  
  716. -- 
  717. Chelly Green | chelly@eden.com | C++ - http://www.eden.com/~chelly
  718.  
  719.  
  720.  
  721. ---------------------------
  722.  
  723. >From "Michael S. Erickson" <mikee@asgsoft.com>
  724. Subject: Determining current "enterable" object in dialog?
  725. Date: 9 Nov 1996 21:01:09 GMT
  726. Organization: Automated Solutions Group
  727.  
  728. How do I determine what is the current object in a dialog?   
  729.  
  730. I need to perform some special area highlighting when I tab into enterable
  731. objects on a dialog.  How can I do this?
  732.  
  733. - -----------------------------------------------------------------------
  734. Michael S. Erickson, President           
  735. mikee@asgsoft.com
  736. http://www.asgsoft.com
  737.  
  738. Automated Solutions Group                Automated Solutions Group France
  739. 16742 Gothard Street, Suite 207          3, rue Troyon
  740. Huntington Beach, CA 92647               75017 Paris France
  741. (714) 375-4252                           (33-1) 47-64-46-22
  742. (714) 848-0382 FAX                       (33-1) 47-64-46-33 FAX
  743.  
  744.            *** Changing the Way Business Views Information ***
  745. - -----------------------------------------------------------------------
  746.  
  747. +++++++++++++++++++++++++++
  748.  
  749. >From ejr@netcom.com (Erik J. Rogers)
  750. Date: Sun, 10 Nov 1996 08:56:10 GMT
  751. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  752.  
  753. Michael S. Erickson (mikee@asgsoft.com) wrote:
  754. [1] : How do I determine what is the current object in a dialog?   
  755.  
  756. [2] : I need to perform some special area highlighting when I tab into 
  757. enterable : objects on a dialog.  How can I do this?
  758.  
  759. - --- Untested, unguaranteed response, OTTOMH -----
  760. [1]  Coerce the dialogPtr to a dialogPeek and check the "editField" 
  761. field.  It contains the current editText item - 1.  the "textH" field 
  762. contains a TERec (see TextEdit) which is reused for the current text item.
  763.  
  764. [2] Firstly, you might consider tracking clicks and keypresses (tab &
  765. shift-tab) yourself and keeping track of which text area is current. 
  766. This is more time consuming to impliment but is a more solid design.  It 
  767. also would allow things like tabbing to non-text items such as a check box 
  768. should you wish to extend the functionality.
  769.  
  770. However, you might be able to do what you need simply by examining the
  771. "editField" field of the DialogRecord involved after passing an event to
  772. the dialog manager.  You could keep a copy of the old editField value and
  773. compare it to the new after each time you pass an event to the dialog
  774. manager to handle.  When you find it has changed, perform your special
  775. hilighting for the given field.
  776.  
  777. I have had success fiddling with these fields in a former project but you
  778. should be cautious in using this approach.  The above scheme might result in
  779. unsightly flicker or other undesirable effect, but I believe it answers
  780. your question.  Feel free to e-mail if I need to be more clear.
  781.  
  782. Erik J. Rogers
  783. ejr@netcom.com
  784.  
  785. +++++++++++++++++++++++++++
  786.  
  787. >From "Michael S. Erickson" <mikee@asgsoft.com>
  788. Date: 9 Nov 1996 21:08:34 GMT
  789. Organization: Automated Solutions Group
  790.  
  791. test
  792.  
  793. +++++++++++++++++++++++++++
  794.  
  795. >From mouser@zercom.net (Martin-Gilles Lavoie)
  796. Date: 12 Nov 1996 13:38:53 GMT
  797. Organization: Groupimage, inc.
  798.  
  799. In article <mikee-0911961305380001@asg.ni.net>, "Michael S. Erickson"
  800. <mikee@asgsoft.com> wrote:
  801.  
  802. > How do I determine what is the current object in a dialog?   
  803. > I need to perform some special area highlighting when I tab into enterable
  804. > objects on a dialog.  How can I do this?
  805.  
  806. By "enterable", I suspect you mean edit fields.  In which case, the
  807. current edit field item can be found using
  808.  
  809.     short   curEdit =   ((DialogRecord*) dialogPtr)->editField+1;
  810.  
  811. The 'editField' structure field is off-by-one, hence the '+1' at the end;
  812.  
  813. Once you have this number, use regular GetDItem()/SetDItem() to access
  814. item data and to modify it.
  815.  
  816. -- 
  817. Martin-Gilles Lavoie  |  Opinions expressed herein are just that.
  818. mouser@zercom.net     |  "No! Do, or do not.  There is no try."
  819. Globimage, inc.       |         --Yoda on error handling
  820.  
  821. ---------------------------
  822.  
  823. >From soeffing@voicenet.com (Christopher Soeffing)
  824. Subject: Drag Manager question
  825. Date: Sun, 10 Nov 1996 12:03:45 -0400
  826. Organization: Voicenet - Internet Access - (215)674-9290
  827.  
  828. I have been able to drag text from my text editor to the desktop. 
  829. Everytime I do it creates a clipping file.  I would also like to be able
  830. to create other types of files, such as a simpleText file.
  831.  
  832. How do I do that ?
  833.  
  834. Thanks for any help or ideas.
  835.  
  836. +++++++++++++++++++++++++++
  837.  
  838. >From BHuey@worldnet.att.net (Hugh Johnson)
  839. Date: Sun, 10 Nov 1996 12:39:02 -0500
  840. Organization: AT&T WorldNet Services
  841.  
  842. In article <soeffing-1011961203450001@philly211.voicenet.com>,
  843. soeffing@voicenet.com (Christopher Soeffing) wrote:
  844.  
  845. > I have been able to drag text from my text editor to the desktop. 
  846. > Everytime I do it creates a clipping file.  I would also like to be able
  847. > to create other types of files, such as a simpleText file.
  848. > How do I do that ?
  849.  
  850. Wow, that doesn't sound too easy. First you'd have to find some way to get
  851. file info on the clipping you just made, then you'd have to delete the
  852. clipping and replace it with your new file, with the same vRefNum and
  853. parID and the same horizontal and vertical placement in the parID, etc. I
  854. mean, that's the only thing I can think of. So it all boils down to
  855. finding a way to get the new clipping's info.
  856.  
  857. -- 
  858. The universe is a figment of it's own imagination.
  859.  
  860. +++++++++++++++++++++++++++
  861.  
  862. >From 3gl21@qlink (Gregory Lo)
  863. Date: Sun, 10 Nov 1996 19:21:12 -0500
  864. Organization: Queen's University
  865.  
  866. In article <soeffing-1011961203450001@philly211.voicenet.com>,
  867. soeffing@voicenet.com (Christopher Soeffing) wrote:
  868.  
  869. >I have been able to drag text from my text editor to the desktop. 
  870. >Everytime I do it creates a clipping file.  I would also like to be able
  871. >to create other types of files, such as a simpleText file.
  872. >
  873. >How do I do that ?
  874.  
  875. Promise a flavor of type PromiseHFSFlavor (or something like that) before
  876. you promise your 'TEXT' flavor, and don't cache your drag-item data.  When
  877. you are called upon by the Drag Manager to send data, check for the type
  878. you promised in the PromiseHFSFlavor structure and create the file using
  879. the location returned in ::GetDropLocation() [or something similiar to
  880. that].
  881.  
  882. The clipping extension acts on the 'TEXT' flavor and creates the clipping
  883. file for you.
  884.  
  885. The Finder accept the PromiseHFSFlavor which is the flavor to use in cases
  886. where you intend to create a file at the drag destination.
  887.  
  888. The documentation for the Drag Manager will help you.  I think it's also
  889. available electronically in PDF and other forms on the net.
  890.  
  891. GLo
  892.  
  893. ---------------------------
  894.  
  895. >From jalan@uclink.berkeley.edu (Joseph Churchill)
  896. Subject: FSpGetFInfo for directories?
  897. Date: Sat, 09 Nov 1996 00:15:33 -0800
  898. Organization: University of California at Berkeley
  899.  
  900. Could anyone point me to some code which uses FSpGetFInfo and FSpSetFInfo
  901. to modify the finder information for _directories_. IM says it works with
  902. directories, but I only get fnfErr (file not found) when I use them. My
  903. FSSpec works fine with the other FSp routines (FSpRename, FSpDelete, etc.),
  904. so it's not the FSSpec.
  905.  
  906. What I'm trying to do is a make a directory invisible and visible again.
  907.  
  908. Either Pascal or C(++) is fine.
  909.  
  910. TIA
  911.  
  912. Joseph
  913. jalan@uclink.berkeley.edu
  914.  
  915. +++++++++++++++++++++++++++
  916.  
  917. >From zobkiw@triplesoft.com (Joe Zobkiw)
  918. Date: Sat, 09 Nov 1996 15:32:40 -0500
  919. Organization: TripleSoft Inc.
  920.  
  921. In article <jalan-ya023180000911960015330001@128.32.155.1>,
  922. jalan@uclink.berkeley.edu (Joseph Churchill) wrote:
  923.  
  924. > Could anyone point me to some code which uses FSpGetFInfo and FSpSetFInfo
  925. > to modify the finder information for _directories_. IM says it works with
  926. > directories, but I only get fnfErr (file not found) when I use them. My
  927. > FSSpec works fine with the other FSp routines (FSpRename, FSpDelete, etc.),
  928. > so it's not the FSSpec.
  929. > What I'm trying to do is a make a directory invisible and visible again.
  930.  
  931. Download the latest version of MoreFiles from:
  932.  
  933.  <http://members.aol.com/jumplong/>
  934.  
  935. Joe Zobkiw                     <mailto:zobkiw@triplesoft.com>
  936. TripleSoft Inc.                  <http://www.triplesoft.com/>
  937. Macintosh Software Development & Internet Publishing Services
  938. - -----------------------------------------------------------
  939. Macintosh Programmers:  <http://www.triplesoft.com/fragment/>
  940. Macintosh WebMasters: <http://www.triplesoft.com/screenview/>
  941. Personal Page:         <http://www.triplesoft.com/zobintosh/>
  942.  
  943. +++++++++++++++++++++++++++
  944.  
  945. >From David Gillies <daggilli@vader.brad.ac.uk>
  946. Date: Mon, 11 Nov 1996 21:08:31 +0000
  947. Organization: University of Bradford
  948.  
  949. Joseph Churchill wrote:
  950. > Could anyone point me to some code which uses FSpGetFInfo and FSpSetFInfo
  951. > to modify the finder information for _directories_. IM says it works with
  952. > directories, but I only get fnfErr (file not found) when I use them. My
  953. > FSSpec works fine with the other FSp routines (FSpRename, FSpDelete, etc.),
  954. > so it's not the FSSpec.
  955. > What I'm trying to do is a make a directory invisible and visible again.
  956. > Either Pascal or C(++) is fine.
  957. IM lies. FSpSetFInfo does not work with directories. Use
  958. PBGet/SetCatInfo
  959. instead. It's dead easy to hide a folder:
  960.  
  961. assuming you have an FSSpec (call it theFSS)
  962.  
  963. CInfoPBRec    infoRec;
  964. OSErr         fileErr;
  965.  
  966. infoRec.ioCompletion=NULL;
  967. infoRec.vRefNum=theFSS.vRefNum;
  968. infoRec.ioDrDirID=theFSS.parID;
  969. infoRec.ioNamePtr=theFSS.name;
  970.  
  971. fileErr=PBGetCatInfoSync((HParmBlkPtr)&infoRec);
  972.  
  973. infoRec.ioDrUsrWds.fdFlags|=fInvisble; // dunno if I've got the name 
  974.                                        // quite right but you get the
  975.                                        // picture
  976.  
  977. fileErr=PBSetCatInfo((HParmBlkPtr)&infoRec);
  978.  
  979. If you want to have this show up immediately then you need to make
  980. the Finder's cache stale by altering the modification date of the
  981. *enclosing* folder. Again use the PBGet/SetCatInfo and GetDateTime
  982. calls to alter the ioDrModDat field of the CInfoPBRec. Recovering the
  983. FSSpec of a folder given an FSSpec of an item inside it is left as
  984. an exercise for the reader.
  985. -- 
  986. ______________________________________________________________________
  987. David A. G. Gillies                        (daggilli@vader.brad.ac.uk)
  988.       University of Bradford, Bradford, West Yorkshire, England
  989. _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  990.  
  991. ---------------------------
  992.  
  993. >From steinei@minna.acc.iit.edu (Neil Steiner)
  994. Subject: Forcing EPS font download
  995. Date: Wed, 06 Nov 1996 13:53:25 -0600
  996. Organization: DesignSoft
  997.  
  998.  
  999. Hello,
  1000.  
  1001. Is anyone familiar with how to force the LaserWriter driver to download
  1002. fonts which have been referenced from an EPS file?
  1003.  
  1004. I am currently using a BeginEPSF/EndEPSF block very similar to that
  1005. described in the PostScript Language Reference Manual, 2nd Edition, and I
  1006. initially thought that the LaserWriter driver would automatically download
  1007. any fonts that it saw referenced in the entire document.
  1008.  
  1009. How can I tell the LaserWriter driver that there are additional fonts that
  1010. need to be downloaded?  If anyone has suggestions, an email reply would be
  1011. great.
  1012.  
  1013.  
  1014. Neil Steiner
  1015. steinei@harpo.cns.iit.edu
  1016.  
  1017. +++++++++++++++++++++++++++
  1018.  
  1019. >From weasel@cs.stanford.edu (The Weasel)
  1020. Date: Fri, 08 Nov 1996 11:38:55 -0800
  1021. Organization: Adobe Systems
  1022.  
  1023. In article <steinei-0611961353250001@custserv.designsoft.com>,
  1024. steinei@minna.acc.iit.edu (Neil Steiner) wrote:
  1025. > How can I tell the LaserWriter driver that there are additional fonts that
  1026. > need to be downloaded?  If anyone has suggestions, an email reply would be
  1027. > great.
  1028.  
  1029. If you know the fonts that are used then set the font using TextFont and
  1030. print a single space using DrawString. This will force the driver to emit
  1031. the font to the printer.
  1032.  
  1033. If you don't know the font by id, you may need to walk the eps and get the
  1034. FOND by name and do the space hack w/ its id.
  1035.  
  1036. \p
  1037.  
  1038. -- 
  1039. --
  1040. #include <stddisclaimer.h>
  1041. ObURL:   http://xenon.stanford.edu/~pchang
  1042. ObQuote: There's no point in being grown up if you can't be 
  1043.          childish sometimes. - Dr. Who
  1044.  
  1045. +++++++++++++++++++++++++++
  1046.  
  1047. >From davep@best.com (Dave Polaschek)
  1048. Date: Sat, 09 Nov 1996 09:33:40 -0600
  1049. Organization: Polaschek Publishing
  1050.  
  1051. In article <weasel-0811961138550001@huxley.corp.adobe.com>,
  1052. weasel@cs.stanford.edu (The Weasel) wrote:
  1053.  
  1054. > In article <steinei-0611961353250001@custserv.designsoft.com>,
  1055. > steinei@minna.acc.iit.edu (Neil Steiner) wrote:
  1056. > > How can I tell the LaserWriter driver that there are additional fonts that
  1057. > > need to be downloaded?  If anyone has suggestions, an email reply would be
  1058. > > great.
  1059. > If you know the fonts that are used then set the font using TextFont and
  1060. > print a single space using DrawString. This will force the driver to emit
  1061. > the font to the printer.
  1062.  
  1063. This is fine for QuickDraw, but for QuickDraw GX, you should actually use
  1064. a smarter method for two reasons. One is that larger fonts are supported
  1065. (you don't really want to download an entire 5M Japanese font) and the
  1066. second is that if you ask for just a space, QuickDraw GX will give you a
  1067. font that contains only a space, since it's optimizing the PostScript it
  1068. generates. This probably isn't what you want.
  1069.  
  1070. See <http://devworld.apple.com/dev/techsupport/develop/issue25/printhints.html>
  1071. for more information.
  1072.  
  1073. > If you don't know the font by id, you may need to walk the eps and get the
  1074. > FOND by name and do the space hack w/ its id.
  1075.  
  1076. -- 
  1077. Dave Polaschek home:davep@best.com work:dpolasch@leonardo.lmt.com
  1078.  
  1079. ---------------------------
  1080.  
  1081. >From David Gillies <daggilli@vader.brad.ac.uk>
  1082. Subject: GIF conversion
  1083. Date: Tue, 12 Nov 1996 17:54:26 +0000
  1084. Organization: University of Bradford
  1085.  
  1086. Can anyone point me towards source code to read GIFs on a Mac? I
  1087. figured out how to read JPEGs by essentially ripping off the sample
  1088. code I found on a develop Bookmark CD, but all searches on the Net
  1089. for GIF code were fruitless. Is there a GIF codec in QuickTime, like
  1090. the JPEG one?
  1091.  
  1092. And yes, I know Compuserve don't like people writing GIF readers 'cos
  1093. of the Unisys patent on LZW but since this is just for my own 
  1094. purposes I figure they can sit and swivel.
  1095.  
  1096. --
  1097. ______________________________________________________________________
  1098. David A. G. Gillies                        (daggilli@vader.brad.ac.uk)
  1099.       University of Bradford, Bradford, West Yorkshire, England
  1100. _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  1101.  
  1102. +++++++++++++++++++++++++++
  1103.  
  1104. >From dbock@fgm.com (David Bock)
  1105. Date: Wed, 13 Nov 1996 10:39:46 -0500
  1106. Organization: FGM
  1107.  
  1108. In article <AEAE950E966818597@192.0.2.1>, squires@crl.com (Scott Squires) wrote:
  1109.  
  1110. > In article <3288B9D2.2976@vader.brad.ac.uk>,
  1111. > David Gillies <daggilli@vader.brad.ac.uk> wrote:
  1112. > >Can anyone point me towards source code to read GIFs on a Mac? I
  1113. > >figured out how to read JPEGs by essentially ripping off the sample
  1114. > >code I found on a develop Bookmark CD, but all searches on the Net
  1115. > >for GIF code were fruitless. Is there a GIF codec in QuickTime, like
  1116. > >the JPEG one?
  1117.  
  1118.  
  1119. David, (and anyone else interested in reading foreign graphic files)
  1120.  
  1121. A company called FGM Software makes a product called PictPorter, which are
  1122. translator libraries that support something like 28 graphic file formats.
  1123. (I am not affiliated with FGM Software...  they are a different company
  1124. than the FGM I work for, but I know they exist because of the name
  1125. collision.)
  1126.  
  1127. Check out the technical details on their web site:
  1128.  
  1129. http://www.fgmsw.com/pictporterapi.html
  1130.  
  1131. -db
  1132.  
  1133. +++++++++++++++++++++++++++
  1134.  
  1135. >From dbock@fgm.com (David Bock)
  1136. Date: Wed, 13 Nov 1996 10:47:02 -0500
  1137. Organization: FGM
  1138.  
  1139. In article <AEAE950E966818597@192.0.2.1>, squires@crl.com (Scott Squires) wrote:
  1140.  
  1141. > In article <3288B9D2.2976@vader.brad.ac.uk>,
  1142. > David Gillies <daggilli@vader.brad.ac.uk> wrote:
  1143. > >Can anyone point me towards source code to read GIFs on a Mac? I
  1144. > >figured out how to read JPEGs by essentially ripping off the sample
  1145. > >code I found on a develop Bookmark CD, but all searches on the Net
  1146. > >for GIF code were fruitless. Is there a GIF codec in QuickTime, like
  1147. > >the JPEG one?
  1148.  
  1149.  
  1150. David, (and anyone else interested in reading foreign graphic files)
  1151.  
  1152. A company called FGM Software makes a product called PictPorter, which are
  1153. translator libraries that support something like 28 graphic file formats.
  1154. (I am not affiliated with FGM Software...  they are a different company
  1155. than the FGM I work for, but I know they exist because of the name
  1156. collision.)
  1157.  
  1158. Check out the technical details on their web site:
  1159.  
  1160. http://www.fgmsw.com/pictporterapi.html
  1161.  
  1162. -db
  1163.  
  1164. +++++++++++++++++++++++++++
  1165.  
  1166. >From squires@crl.com (Scott Squires)
  1167. Date: Tue, 12 Nov 1996 20:56:46 -0800
  1168. Organization: Puffin Designs
  1169.  
  1170. In article <3288B9D2.2976@vader.brad.ac.uk>,
  1171. David Gillies <daggilli@vader.brad.ac.uk> wrote:
  1172.  
  1173. >Can anyone point me towards source code to read GIFs on a Mac? I
  1174. >figured out how to read JPEGs by essentially ripping off the sample
  1175. >code I found on a develop Bookmark CD, but all searches on the Net
  1176. >for GIF code were fruitless. Is there a GIF codec in QuickTime, like
  1177. >the JPEG one?
  1178. >
  1179. >And yes, I know Compuserve don't like people writing GIF readers 'cos
  1180. >of the Unisys patent on LZW but since this is just for my own 
  1181. >purposes I figure they can sit and swivel.
  1182.  
  1183. Yes, QT 2.5 supports importing GIF files.
  1184.  
  1185. Check out  <http://www.QuickTimeFAQ.org/> for more info.
  1186.  
  1187. -scott
  1188.  
  1189.  
  1190. Scott Squires               "Insert funny stuff here"
  1191. squires@crl.com
  1192. ScottSquir@aol.com
  1193.  
  1194.  
  1195. ---------------------------
  1196.  
  1197. >From <jcushing@grove.ufl.edu>
  1198. Subject: GWorlds and Graphic devices
  1199. Date: Thu, 7 Nov 1996 13:30:57 -0500
  1200. Organization: University of Florida
  1201.  
  1202. According to Apple's documentation, when you call NewGWorld() passing zero
  1203. for the pixel depth, it uses an existing GDHandle.  When you pass it any
  1204. other value, it is supposed to create a new GDHandle, so long as you do
  1205. not explicitly tell it not to through the flags parameter.
  1206.  
  1207. However, when I tell NewGWorld() to create a 8-bit GWorld, for instance,
  1208. and call GetGWorldDevice(), the handle it returns is the same as the
  1209. handle returned by GetMainDevice(), indicating that it has not actually
  1210. created a new device.
  1211.  
  1212. Since I do actually need a new device, how can I force NewGWorld() to
  1213. create one?  Or, does anybody have any advice on using NewGDevice() to set
  1214. up a new graphics device that could be passed as the parameter to
  1215. NewGWorld()?
  1216.  
  1217.  
  1218. +++++++++++++++++++++++++++
  1219.  
  1220. >From "Chao-Kuang Yang" <ckyang@earthlink.net>
  1221. Date: 8 Nov 1996 11:41:45 GMT
  1222. Organization: Cram Softnology
  1223.  
  1224. Hi!
  1225.     Hm... actually, if I remember right, NewGWorld only uses the GDHandle to
  1226. create the GWorld.  It doesn't create a new GDevice.
  1227.  
  1228.     BTW, why you want to have a new GDevice?
  1229.  
  1230. Mark Yang
  1231.  
  1232. -- 
  1233. - --------------------------------------------------------------------------
  1234. - --
  1235. MetaTools Program Team
  1236. email: ckyang@earthlink.net;
  1237.           myang@metatools.com;
  1238.  
  1239. jcushing@grove.ufl.edu wrote in article
  1240. <Pine.OSF.3.95.961107132620.31214C-100000@palm>...
  1241. > According to Apple's documentation, when you call NewGWorld() passing
  1242. zero
  1243. > for the pixel depth, it uses an existing GDHandle.  When you pass it any
  1244. > other value, it is supposed to create a new GDHandle, so long as you do
  1245. > not explicitly tell it not to through the flags parameter.
  1246. > However, when I tell NewGWorld() to create a 8-bit GWorld, for instance,
  1247. > and call GetGWorldDevice(), the handle it returns is the same as the
  1248. > handle returned by GetMainDevice(), indicating that it has not actually
  1249. > created a new device.
  1250. > Since I do actually need a new device, how can I force NewGWorld() to
  1251. > create one?  Or, does anybody have any advice on using NewGDevice() to
  1252. set
  1253. > up a new graphics device that could be passed as the parameter to
  1254. > NewGWorld()?
  1255.  
  1256. +++++++++++++++++++++++++++
  1257.  
  1258. >From darth@zfn.uni-bremen.de (Jochen Lippert)
  1259. Date: Fri, 08 Nov 1996 18:35:17 +0100
  1260. Organization: University of  Bremen
  1261.  
  1262. In article <Pine.OSF.3.95.961107132620.31214C-100000@palm>,
  1263. <jcushing@grove.ufl.edu> wrote:
  1264.  
  1265. > According to Apple's documentation, when you call NewGWorld() passing zero
  1266. > for the pixel depth, it uses an existing GDHandle.  When you pass it any
  1267. > other value, it is supposed to create a new GDHandle, so long as you do
  1268. > not explicitly tell it not to through the flags parameter.
  1269.  
  1270. My impression was that passing zero as the pixel depth sets the pixel
  1271. depth of the GWorld to the pixel depth of the "deepest" GDevice...
  1272.  
  1273. > Since I do actually need a new device, how can I force NewGWorld() to
  1274. > create one?  Or, does anybody have any advice on using NewGDevice() to set
  1275. > up a new graphics device that could be passed as the parameter to
  1276. > NewGWorld()?
  1277.  
  1278. Yup, that will be the way to go. Create a GDevice and pass it to NewGWorld.
  1279.  
  1280. Jochen Lippert
  1281.  
  1282. darth@zfn.uni-bremen.de
  1283.  
  1284. ---------------------------
  1285.  
  1286. >From friefeld@deltanet.com (Rob Friefeld)
  1287. Subject: GetResource and temporary memory
  1288. Date: Sun, 03 Nov 1996 15:46:51 -0800
  1289. Organization: (none)
  1290.  
  1291. Is there a way to read a resource into temporary memory? My particular need
  1292. is to read large sound files and play them immediately.
  1293.  
  1294.  
  1295.                                       Rob Friefeld
  1296.  
  1297. +++++++++++++++++++++++++++
  1298.  
  1299. >From tree@apple.com (Tom Emerson)
  1300. Date: Mon, 04 Nov 1996 12:32:48 -0500
  1301. Organization: Apple Computer, Inc.
  1302.  
  1303. In article <friefeld-ya023180000311961546510001@news.deltanet.com>,
  1304. friefeld@deltanet.com (Rob Friefeld) wrote:
  1305.  
  1306. >Is there a way to read a resource into temporary memory? My particular need
  1307. >is to read large sound files and play them immediately.
  1308.  
  1309. You can use ReadPartialResource() to do this. Something along the lines of:
  1310.  
  1311. Handle GetResourceTempMem(ResType theType, short theID)
  1312. {
  1313.     Handle theResource;
  1314.     Handle theTempHandle = NULL;
  1315.     long resSize;
  1316.  
  1317.     SetResLoad(false);
  1318.     theResource = GetResource(theType, theID);
  1319.     SetResLoad(true);
  1320.  
  1321.     if (theResource)
  1322.     {
  1323.         resSize = GetResourceSizeOnDisk(theResource);
  1324.         if (resSize != -1)
  1325.         {
  1326.             OSErr rc;
  1327.  
  1328.             theTempHandle = TempNewHandle(resSize, rc);
  1329.             if (theTempHandle)
  1330.             {
  1331.                 HLock(theTempHandle);
  1332.                 ReadPartialResource(theResource, 0,
  1333.                     *theTempHandle, resSize);
  1334.                 HUnlock(theTempHandle);
  1335.                 if ((ResError() != noErr) ||
  1336.                     (ResError() != inputOutOfBounds))
  1337.                 {
  1338.                     DisposeHandle(theTempHandle);
  1339.                     theTempHandle = NULL;
  1340.                 }
  1341.             }
  1342.         }
  1343.         ReleaseResource(theResource);
  1344.     }
  1345.     return theTempHandle;
  1346. }
  1347.  
  1348. I haven't compiled or tested this, but it should work.
  1349.  
  1350.     -tre
  1351.  
  1352. --
  1353. Tom Emerson                                                 Cambridge R&D
  1354. Senior Software Engineer                             Apple Computer, Inc.
  1355. <mailto:tree@apple.com>                  <http://www.tiac.net/users/tree>
  1356.  
  1357. +++++++++++++++++++++++++++
  1358.  
  1359. >From CK@ravenware.com (C.K. Haun)
  1360. Date: Sat, 09 Nov 1996 14:12:26 -0700
  1361. Organization: Ravenware Software
  1362.  
  1363. > In article <friefeld-ya023180000311961546510001@news.deltanet.com>,
  1364. > friefeld@deltanet.com (Rob Friefeld) wrote:
  1365. > >Is there a way to read a resource into temporary memory? My particular need
  1366. > >is to read large sound files and play them immediately.
  1367. The Resource Manager will allocate memory and load a resource into
  1368. whatever heap happens to be the current heap.
  1369.  
  1370. This means that you can create a sub heap (either in your app or in temp
  1371. mem) by allocating a handle, calling InitZone on that handle (of course,
  1372. locking the handle would be a dandy idea), setting the current zone to
  1373. that zone, and calling GetResource.  That will result in the resource
  1374. ending up in that zone.
  1375. When you're done, dispose of the resource and dispose of the handle that
  1376. contains the zone you've created.
  1377. C.K. Haun
  1378. Ravenware Software
  1379. CK@Ravenware.com          http://WWW.Ravenware.com for Mac shareware
  1380.                           The Mild Bunch
  1381. 1996 Royal Star 1300      1991 Voyager 1200       1990 Virago 750
  1382. 1993 Virago 535          <reflex got sold>         <rent this space>
  1383.  
  1384. ---------------------------
  1385.  
  1386. >From mwilson@teleport.com (Matthew R. Wilson)
  1387. Subject: Gettings click coordinates
  1388. Date: Sun, 03 Nov 1996 14:26:07 -0800
  1389. Organization: Teleport - Portland's Public Access (503) 220-1016
  1390.  
  1391. I have a normal window being displayed with some PICTs drawn into it.  If
  1392. the user clicks on a certain rectangular region of the PICT, as defined by
  1393. coordinates I provide, I want my application to do something.  So my
  1394. question is what can I do to determine if the click coordinates are within
  1395. the rectangle I want?  Thanks in advance for any help.
  1396.  
  1397. MRW
  1398.  
  1399. -- 
  1400. --Matthew R. Wilson (mwilson@teleport.com)
  1401. --"Nothing Unreal Exists"
  1402. --http://www.teleport.com/~mwilson
  1403.  
  1404. +++++++++++++++++++++++++++
  1405.  
  1406. >From carl.gustafson@no.spam.welcome (Carl Gustafson)
  1407. Date: Tue, 05 Nov 1996 08:12:58 -0500
  1408. Organization: Imaging and Computer Vision Center, Drexel University
  1409.  
  1410. In article <mwilson-0311961426070001@ip-pdx06-18.teleport.com>,
  1411. mwilson@teleport.com (Matthew R. Wilson) wrote:
  1412.  
  1413. > I have a normal window being displayed with some PICTs drawn into it.  If
  1414. > the user clicks on a certain rectangular region of the PICT, as defined by
  1415. > coordinates I provide, I want my application to do something.  So my
  1416. > question is what can I do to determine if the click coordinates are within
  1417. > the rectangle I want?  Thanks in advance for any help.
  1418.  
  1419. On a mouse-down event, use the where field of the event record to
  1420. determine where, then simply run through your list of rectangles using the
  1421. PtInRect() function. It returns a boolean.
  1422.  
  1423. -- 
  1424. Carl Gustafson
  1425. carl.gustafson at ece.drexel.edu
  1426. (busily trying to avoid spammers)
  1427. Imaging and Computer Vision Center
  1428. Drexel University, Philadelphia, Penna
  1429. - ----------------------------------------------------------
  1430. I don't speak for Drexel, and Drexel doesn't listen to me...
  1431.  
  1432. +++++++++++++++++++++++++++
  1433.  
  1434. >From at@neuro.psy.soton.ac.uk (Freezer Burn)
  1435. Date: Thu, 07 Nov 1996 18:19:51 +0000
  1436. Organization: Insaneous Noise Systems
  1437.  
  1438. In article <mwilson-0311961426070001@ip-pdx06-18.teleport.com>,
  1439. mwilson@teleport.com (Matthew R. Wilson) wrote:
  1440.  
  1441. > I have a normal window being displayed with some PICTs drawn into it.  If
  1442. > the user clicks on a certain rectangular region of the PICT, as defined by
  1443. > coordinates I provide, I want my application to do something.  So my
  1444. > question is what can I do to determine if the click coordinates are within
  1445. > the rectangle I want?  Thanks in advance for any help.
  1446.  
  1447. In a WaitNextEvent loop you'll receive various events. One of them is a
  1448. mouseDown event. Check if the mouseDown is in the window with the picture,
  1449. then convert the mouseLoc (in the event field) to local coordinates and
  1450. call PtInRect (or whatever that ToolBox function is called).
  1451.  
  1452. It's very easy, really,
  1453.  
  1454. Good luck,
  1455.  
  1456. Adriaan
  1457.  
  1458. ______________________________________________________________
  1459.  
  1460. Cognitive Scientist & Mac Guru
  1461.  
  1462. Work:
  1463.    Cognitive Sciences Centre
  1464.    Department of Psychology
  1465.    University of Southampton
  1466.    United Kingdom
  1467.  
  1468. Homepages:
  1469.    work:    http://www.soton.ac.uk/~coglab/coglab
  1470.    life:    http://www.soton.ac.uk/~agt/
  1471.    Sonic:   http://www.soton.ac.uk/~agt/Sonic/
  1472.  
  1473. E-mail:
  1474.    at@neuro.psy.soton.ac.uk
  1475.    at@cogsci.ecs.soton.ac.uk
  1476.    agt@oak.soton.ac.uk
  1477. ______________________________________________________________
  1478.  
  1479. -- 
  1480. <BOLD>procrastinate</BOLD> <ITALIC>v.</ITALIC>
  1481. <BR>
  1482. (<BOLD>-ting</BOLD>) defer action.
  1483. <BR><BR>
  1484. <BOLD>Usage</BOLD> <ITALIC>Procrastinate</ITALIC> is often confused
  1485. with <ITALIC>prevaricate</ITALIC> which means "to be evasive, quibble".
  1486. <BR><BR>
  1487. From: the Oxford Dictionary of Current English
  1488.  
  1489.  
  1490. +++++++++++++++++++++++++++
  1491.  
  1492. >From "Tedd F. Sperling" <sperling@sperling.com>
  1493. Date: Mon, 11 Nov 1996 09:16:43 +0000
  1494. Organization: Sperling Corporation
  1495.  
  1496. Matthew R. Wilson wrote:
  1497. > I have a normal window being displayed with some PICTs drawn into it.  If
  1498. > the user clicks on a certain rectangular region of the PICT, as defined by
  1499. > coordinates I provide, I want my application to do something.  So my
  1500. > question is what can I do to determine if the click coordinates are within
  1501. > the rectangle I want?  Thanks in advance for any help.
  1502. > MRW
  1503. > --
  1504. > --Matthew R. Wilson (mwilson@teleport.com)
  1505. > --"Nothing Unreal Exists"
  1506. > --http://www.teleport.com/~mwilson
  1507.  
  1508. Hi:
  1509.  
  1510. Check out PtInRect(pt,rect)
  1511.  
  1512. tedd
  1513.  
  1514. -- 
  1515.    ____
  1516.   |[  ]| mac programmer                             tedd f. sperling
  1517.   |[__]|                               mailto: sperling@sperling.com
  1518.   |___-|                http://www.sojourn.com/~sperling/resume.html
  1519. - -
  1520.  
  1521. ---------------------------
  1522.  
  1523. >From wcs@bnr.ca (Warren Stone)
  1524. Subject: Help with coding paint fill function
  1525. Date: 7 Nov 1996 15:39:54 GMT
  1526. Organization: Bell-Northern Research Ltd.
  1527.  
  1528. My daughter is taking her first programming class and they are using Turbo
  1529. Pascal so I'm trying to write some equivalent routines in CodeWarrior Pascal so
  1530. she can do some work at home. TP has the procedure:
  1531.  
  1532. FloodFill (X, Y, Color)
  1533.  
  1534. Which basically performs the MacPaint paint bucket tool function. I haven't
  1535. played around with Mac programming for a few years, can anyone help me out with
  1536. either Pascal or C code to create this function?
  1537.  
  1538. Please email me or post.
  1539.  
  1540. Thanks,
  1541. Warren
  1542. wstone@flash.net
  1543.  
  1544. +++++++++++++++++++++++++++
  1545.  
  1546. >From zobkiw@triplesoft.com (Joe Zobkiw)
  1547. Date: Sat, 09 Nov 1996 15:36:56 -0500
  1548. Organization: TripleSoft Inc.
  1549.  
  1550. In article <55svsa$f7p@crchh327.rich.bnr.ca>, wcs@bnr.ca (Warren Stone) wrote:
  1551.  
  1552. > My daughter is taking her first programming class and they are using Turbo
  1553. > Pascal so I'm trying to write some equivalent routines in CodeWarrior
  1554. Pascal so
  1555. > she can do some work at home. TP has the procedure:
  1556. > FloodFill (X, Y, Color)
  1557. > Which basically performs the MacPaint paint bucket tool function. I haven't
  1558. > played around with Mac programming for a few years, can anyone help me
  1559. out with
  1560. > either Pascal or C code to create this function?
  1561.  
  1562. Check these out:
  1563.  
  1564.  <http://vision.dai.ed.ac.uk/andrewfg/graphics/floodfill.html>
  1565.  
  1566.  <http://vision.dai.ed.ac.uk/andrewfg/c-g-a-faq.html>
  1567.  
  1568. Joe Zobkiw                     <mailto:zobkiw@triplesoft.com>
  1569. TripleSoft Inc.                  <http://www.triplesoft.com/>
  1570. Macintosh Software Development & Internet Publishing Services
  1571. - -----------------------------------------------------------
  1572. Macintosh Programmers:  <http://www.triplesoft.com/fragment/>
  1573. Macintosh WebMasters: <http://www.triplesoft.com/screenview/>
  1574. Personal Page:         <http://www.triplesoft.com/zobintosh/>
  1575.  
  1576. +++++++++++++++++++++++++++
  1577.  
  1578. >From squires@crl.com (Scott Squires)
  1579. Date: Sun, 10 Nov 1996 15:07:57 -0800
  1580. Organization: Puffin Designs
  1581.  
  1582. In article <55svsa$f7p@crchh327.rich.bnr.ca>,
  1583. wcs@bnr.ca (Warren Stone) wrote:
  1584.  
  1585. >My daughter is taking her first programming class and they are using Turbo
  1586. >Pascal so I'm trying to write some equivalent routines in CodeWarrior Pascal so
  1587. >she can do some work at home. TP has the procedure:
  1588. >
  1589. >FloodFill (X, Y, Color)
  1590. >
  1591. >Which basically performs the MacPaint paint bucket tool function. I haven't
  1592. >played around with Mac programming for a few years, can anyone help me out with
  1593. >either Pascal or C code to create this function?
  1594.  
  1595. Check out SeedCFill, CopyMask, CalcMask(?).
  1596.  
  1597. -scott
  1598.  
  1599.  
  1600. Scott Squires               "Insert funny stuff here"
  1601. squires@crl.com
  1602. ScottSquir@aol.com
  1603.  
  1604.  
  1605. ---------------------------
  1606.  
  1607. >From Kenneth Lu <kenlu@mit.edu>
  1608. Subject: Memory Usage Reporter Utility?
  1609. Date: Wed, 06 Nov 1996 18:48:39 -0500
  1610. Organization: M.I.T.
  1611.  
  1612. Does anyone know of any program that would allow me to determine peak
  1613. memory usage in a program I write?
  1614.  
  1615. I want something that'll run in the background and bascially monitor the
  1616. same thing that the About this Mac dialog monitors (if you use balloon
  1617. help) and tell me the most memory a particular program has used to date.
  1618.  
  1619. Otherwise, what is the best way to determine how much RAM my program
  1620. needs to be allocated? (besides trial and error).
  1621.  
  1622. BTW, please reply both to this group and via email.
  1623.  
  1624. Thanks.
  1625.  
  1626. -ToastyKen
  1627.  
  1628. - -----------------------------
  1629. | Kenneth Lu -- kenlu@mit.edu |
  1630. - -----------------------------
  1631.  
  1632. +++++++++++++++++++++++++++
  1633.  
  1634. >From bboppie@aol.com
  1635. Date: 8 Nov 1996 03:57:03 GMT
  1636. Organization: America Online, Inc. (1-800-827-6364) (1.10)
  1637.  
  1638. One way would to not add any calls to MoreMasters(), use the program a lot
  1639. then drop into MacsBug and see how many calls to MoreMasters it makes and
  1640. go from their or use ZoneRanger or MemoryMine.
  1641.  
  1642. BBoppie
  1643.  
  1644. +++++++++++++++++++++++++++
  1645.  
  1646. >From kjohnson@transparent.com (Kent Johnson)
  1647. Date: Fri, 8 Nov 1996 03:18:35 GMT
  1648. Organization: Transparent Language, Inc.
  1649.  
  1650. In article <328123D5.3ADD@mit.edu>, kenlu@mit.edu wrote:
  1651.  
  1652. > Does anyone know of any program that would allow me to determine peak
  1653. > memory usage in a program I write?
  1654. > I want something that'll run in the background and bascially monitor the
  1655. > same thing that the About this Mac dialog monitors (if you use balloon
  1656. > help) and tell me the most memory a particular program has used to date.
  1657. > Otherwise, what is the best way to determine how much RAM my program
  1658. > needs to be allocated? (besides trial and error).
  1659.  
  1660. Metrowerks ZoneRanger is an easy way to look at the free memory at any
  1661. time. It doesn't keep a high-water mark but it does help you understand
  1662. how your memory is being used. You can also use Macsbug to monitor the
  1663. heap though it is not nearly as convenient.
  1664.  
  1665. I think the MW Profiler tells you the max stack used and MW DebugNew can
  1666. tell you the most that was allocated with operator new.
  1667.  
  1668. None of these does exactly what you want but they might help.
  1669.  
  1670. Kent Johnson                                kjohnson@transparent.com
  1671. Transparent Language, Inc.                http://www.transparent.com
  1672.  
  1673. ---------------------------
  1674.  
  1675. >From "Kolbjørn Aambø" <kaamboe@ulrik.uio.no>
  1676. Subject: Native JAVA on Macintosh?
  1677. Date: 7 Nov 96 14:16:53 +0100
  1678. Organization: University of Oslo, Norway
  1679.  
  1680.     
  1681. Since Java seem to be a more wholeheartly attemt to implement the first
  1682. Object Oriented Language Simula-67 than both Object-Pascal and the rather
  1683. erratic C++, and therefore should be expected to be more stable and
  1684. understandable I would hope that Apple could re-implemet its system to have
  1685. a JAVA API. Since Apple seem to take the JAVA sereously that don't seem to
  1686. be the most farfetched of ideas. Is there any chance that this will happen?
  1687. After all Apple have officially stated that the Macintosh will be turned
  1688. into the best of Java Machines. What would then be more natural than to
  1689. give it all a fresh JAVA API? 
  1690.  
  1691. Will CodeWarrior then please consider to compile into Native for Macintosh
  1692. Applications and Opendoc Live Objects? 
  1693.  
  1694. Would not a JAVA implemetation give a easier treatment of UNICODE on the
  1695. Macintosh than further extension of a 12 years old pascal/assembly
  1696. framework?
  1697.  
  1698.  
  1699. - -------------------------------------------------------
  1700. -- The Macintosh is bad enough...
  1701. - -------------------------------------------------------
  1702.  
  1703.  
  1704.  
  1705.  
  1706. +++++++++++++++++++++++++++
  1707.  
  1708. >From got@pobox.com (Gordon Tillman)
  1709. Date: Thu, 07 Nov 1996 08:37:48 -0500
  1710. Organization: n/a
  1711.  
  1712. Hi Kolbjørn,
  1713.  
  1714. You had asked about Java on the Macintosh...
  1715.  
  1716. Take a look at Apple's site, URL:
  1717.  
  1718.     http://devtools.apple.com/mrj/
  1719.  
  1720. They have their latest relase of the Mac OS for Java and their SDK.  I
  1721. think you will find what you are looking for there.
  1722.  
  1723. As a side note: I have found Apple's Java runtime to be the best of all
  1724. that I have tried.  These include:
  1725.  
  1726.     Netscape Navigator's 3.01
  1727.     Roaster DR2.3
  1728.     JDK 1.02
  1729.     
  1730.  
  1731. Regards,
  1732.  
  1733. Gordon Tillman (got@pobox.com)
  1734.  
  1735. +++++++++++++++++++++++++++
  1736.  
  1737. >From jquinn@nntp.best.com (Greg)
  1738. Date: 10 Nov 1996 00:58:21 GMT
  1739. Organization: Best Internet Communications
  1740.  
  1741. Gordon Tillman (got@pobox.com) wrote:
  1742. : Hi Kolbjørn,
  1743.  
  1744. : You had asked about Java on the Macintosh...
  1745.  
  1746. : Take a look at Apple's site, URL:
  1747.  
  1748. :     http://devtools.apple.com/mrj/
  1749.  
  1750. On a related note, I had compiled some Java apps on a unix box and then
  1751. FTP's them through to the Mac, on which I had installed the MRJ upgrade,
  1752. but the Java class file is not automatically recognized as a Java file. I
  1753. am sure that this is some dumb mistake on my part, but how do you manually
  1754. change the file type to be a Java executable if the class file was not
  1755. compiled on the Mac?
  1756. Thanks for any help
  1757. Greg
  1758.  
  1759. +++++++++++++++++++++++++++
  1760.  
  1761. >From got@pobox.com (Gordon Tillman)
  1762. Date: Sat, 09 Nov 1996 20:42:40 -0500
  1763. Organization: n/a
  1764.  
  1765. Hi Greg,
  1766.  
  1767. You had asked:
  1768.  
  1769. > On a related note, I had compiled some Java apps on a unix box and then
  1770. > FTP's them through to the Mac, on which I had installed the MRJ upgrade,
  1771. > but the Java class file is not automatically recognized as a Java file. I
  1772. > am sure that this is some dumb mistake on my part, but how do you manually
  1773. > change the file type to be a Java executable if the class file was not
  1774. > compiled on the Mac?
  1775.  
  1776. Off the top of my head I do not know what Finder creator type you need to
  1777. use for Apple's runtime.  You should be able to "drag and drop" the class
  1778. or html file onto the the "Apple Applet Runner" icon and have it open the
  1779. file OK.  
  1780.  
  1781. If you have a fairly recent version of the Mac OS installed; that is, one
  1782. that has the Macintosh Easy Open control panel loaded, then the first time
  1783. you double-click on a class file (and maybe also on an html file -- not
  1784. sure about that)  easy open should display a dialog box asking you which
  1785. application you wish to use.  Just select the Apple Apple Runner and from
  1786. that point on it should "remember" that setting.
  1787.  
  1788. --gordon
  1789.  
  1790. ---------------------------
  1791.  
  1792. >From Eric Conger <yoeric@pdial.interpath.com>
  1793. Subject: PBCatSearch
  1794. Date: Tue, 05 Nov 1996 23:43:20 -0500
  1795. Organization: YOERIC Corporation
  1796.  
  1797. I am trying to do a volume search using PBCatSearch.  I want to get all
  1798. of the inforamtion for a given file type OR creator.  For example if I
  1799. want to get all of the APPL or if I want all of the TEXT.  The question
  1800. is how do I tell PBCatSearch to wildcard the creator or file type?
  1801.  
  1802. So far, I have set up my search1Rec and search2Rec so that search 1
  1803. contains the filetype and search 2 has the 0xffffffff mask in the finder
  1804. info struct.  I don't know what to put in the creator to make it work.
  1805.  
  1806. Any suggestions would be appreciated.
  1807.  
  1808. Thanks,
  1809. Susan G. Conger
  1810. YOERIC Corporation
  1811.  
  1812. +++++++++++++++++++++++++++
  1813.  
  1814. >From Conal Walsh <conal@ind.tansu.com.au>
  1815. Date: Fri, 8 Nov 1996 12:37:49 +1100
  1816. Organization: Telstra
  1817.  
  1818. On Tue, 5 Nov 1996, Eric Conger wrote:
  1819.  
  1820. > I am trying to do a volume search using PBCatSearch.  I want to get all
  1821. > of the inforamtion for a given file type OR creator.  For example if I
  1822. > want to get all of the APPL or if I want all of the TEXT.  The question
  1823. > is how do I tell PBCatSearch to wildcard the creator or file type?
  1824. > So far, I have set up my search1Rec and search2Rec so that search 1
  1825. > contains the filetype and search 2 has the 0xffffffff mask in the finder
  1826. > info struct.  I don't know what to put in the creator to make it work.
  1827. > Any suggestions would be appreciated.
  1828.  
  1829. If you have access to CodeWarrior, there is an example that demonstrates
  1830. PBCatSearch() and the thread manager. I think the example is just called
  1831. "PBCatSearch".
  1832.  
  1833. Regards
  1834.  
  1835.   /||\     Conal Walsh
  1836.  / ||/     Correct Procedures Pty Ltd     Engineering and Consultancy
  1837.  \ ||      Sydney, Australia              Services for the
  1838.   \||      correct@mypostbox.com          Telecommunications Industry
  1839.  
  1840. "Some people live in the fast lane; I live in the oncoming traffic."
  1841.  
  1842.  
  1843. +++++++++++++++++++++++++++
  1844.  
  1845. >From jumplong@aol.com
  1846. Date: 9 Nov 1996 04:56:36 GMT
  1847. Organization: America Online, Inc. (1-800-827-6364) (1.10)
  1848.  
  1849. Susan G. Conger wrote:
  1850. >I am trying to do a volume search using PBCatSearch.  I want to
  1851. >get all of the inforamtion for a given file type OR creator. 
  1852. >For example if I want to get all of the APPL or if I want all of
  1853. >the TEXT.  The question is how do I tell PBCatSearch to wildcard
  1854. >the creator or file type?
  1855. >
  1856. >So far, I have set up my search1Rec and search2Rec so that
  1857. >search 1 contains the filetype and search 2 has the 0xffffffff
  1858. >mask in the finder info struct.  I don't know what to put in the
  1859. >creator to make it work.
  1860. >
  1861. >Any suggestions would be appreciated.
  1862.  
  1863. Get MoreFiles <ftp://members.aol.com/JumpLong/MoreFiles_1.4.3.sea.hqx> and
  1864. look in the file Search.c at the function CreatorTypeFileSearch. It shows
  1865. how to do just what you asked for.
  1866.  
  1867. - Jim Luther
  1868.  
  1869.  
  1870. ---------------------------
  1871.  
  1872. >From fridi@studbox.uni-stuttgart.de (Fridtjof Siebert)
  1873. Subject: PEF file format documentation required
  1874. Date: Tue, 12 Nov 1996 00:34:48 +0100
  1875. Organization: Comp.Center (RUS), U of Stuttgart, FRG
  1876.  
  1877. I am looking for documentation on the Preferred Executable Format. I have
  1878. Inside-Mac: PPC System Software and MPW here, but I couldn¥t find any
  1879. detailed information on the format.
  1880.  
  1881. Thanks for your help, 
  1882.  
  1883. Fridtjof Siebert
  1884.  
  1885. --
  1886. fridi@studbox.uni-stuttgart.de
  1887.  
  1888. +++++++++++++++++++++++++++
  1889.  
  1890. >From Steven Kortze <skortze@erols.com>
  1891. Date: Mon, 11 Nov 1996 20:12:48 +0000
  1892. Organization: Erol's Internet Services
  1893.  
  1894. Fridtjof Siebert wrote:
  1895. > I am looking for documentation on the Preferred Executable Format. I have
  1896. > Inside-Mac: PPC System Software and MPW here, but I couldn¥t find any
  1897. > detailed information on the format.
  1898. > Thanks for your help,
  1899. > Fridtjof Siebert
  1900. > --
  1901. > fridi@studbox.uni-stuttgart.de
  1902.  
  1903. Apple has a software licensing page where you basically select the case
  1904. that suits you: using the PEF spec for an Apple (i.e. Macintosh) or
  1905. non-Apple (such as Be) platform. The URL is
  1906. http://www.devworld.apple.com/mkt/registering/swl/agreements.html#pef.
  1907. The licensing fee is ...$0! I downloaded my copy of the PEF spec last
  1908. week. 
  1909.  
  1910. Good luck,
  1911. Steve
  1912.  
  1913. +++++++++++++++++++++++++++
  1914.  
  1915. >From zobkiw@triplesoft.com (Joe Zobkiw)
  1916. Date: Mon, 11 Nov 1996 20:45:00 -0500
  1917. Organization: TripleSoft Inc.
  1918.  
  1919. In article <fridi-1211960034480001@dynip11.informatik.uni-stuttgart.de>,
  1920. fridi@studbox.uni-stuttgart.de (Fridtjof Siebert) wrote:
  1921.  
  1922. > I am looking for documentation on the Preferred Executable Format. I have
  1923. > Inside-Mac: PPC System Software and MPW here, but I couldn¥t find any
  1924. > detailed information on the format.
  1925.  
  1926. Go here: 
  1927.  
  1928.   <http://devworld.apple.com/mkt/registering/swl/agreements.html#pef>
  1929.  
  1930. - -----------------------------------------------------------
  1931. Joe Zobkiw                     <mailto:zobkiw@triplesoft.com>
  1932. TripleSoft Inc.                  <http://www.triplesoft.com/>
  1933. Macintosh Software Development & Internet Publishing Services
  1934. - -----------------------------------------------------------
  1935. Macintosh Programmers:  <http://www.triplesoft.com/fragment/>
  1936. Macintosh WebMasters: <http://www.triplesoft.com/screenview/>
  1937. Personal Page:         <http://www.triplesoft.com/zobintosh/>
  1938.  
  1939. ---------------------------
  1940.  
  1941. >From phil_weiss@pdm-inc.com (Phil Weiss)
  1942. Subject: PICT or Image manipulation libraries
  1943. Date: Thu, 24 Oct 1996 16:22:25 -0500
  1944. Organization: PDM
  1945.  
  1946.   Anyone know of a library or sources that will manipulate a PICT or PixMap?
  1947.  
  1948.   Especially, changing the brightness, contrast, or color?
  1949.  
  1950.  
  1951. Thanks,
  1952.  
  1953. Phil
  1954. e-mail: phil_weiss@pdm-inc.com
  1955.  
  1956. +++++++++++++++++++++++++++
  1957.  
  1958. >From rmg19@mail.idt.net (Roy Glikin)
  1959. Date: Sat, 02 Nov 1996 12:38:00 -0500
  1960. Organization: IDT 
  1961.  
  1962. The standard application to perform the functions you require is Adobe's
  1963. Photoshop.  Even the LE versions, will perform these basic corrections.
  1964.  
  1965. In article <phil_weiss-2410961622250001@ts02-10.dialup.ais.net>,
  1966. phil_weiss@pdm-inc.com (Phil Weiss) wrote:
  1967.  
  1968. >   Anyone know of a library or sources that will manipulate a PICT or PixMap?
  1969. >   Especially, changing the brightness, contrast, or color?
  1970. > Thanks,
  1971. > Phil
  1972. > e-mail: phil_weiss@pdm-inc.com
  1973.  
  1974. +++++++++++++++++++++++++++
  1975.  
  1976. >From dkj@apple.com (Dave Johnson)
  1977. Date: Wed, 06 Nov 1996 11:47:15 -0800
  1978. Organization: Apple Computer, Inc.
  1979.  
  1980. In article <rmg19-0211961238000001@boston-pm1-dyn26.pcix.com>,
  1981. rmg19@mail.idt.net (Roy Glikin) wrote:
  1982.  
  1983. > The standard application to perform the functions you require is Adobe's
  1984. > Photoshop.  Even the LE versions, will perform these basic corrections.
  1985. > In article <phil_weiss-2410961622250001@ts02-10.dialup.ais.net>,
  1986. > phil_weiss@pdm-inc.com (Phil Weiss) wrote:
  1987. > >   Anyone know of a library or sources that will manipulate a PICT or PixMap?
  1988. > > 
  1989. > >   Especially, changing the brightness, contrast, or color?
  1990. > > 
  1991. > > 
  1992. > > Thanks,
  1993. > > 
  1994. > > Phil
  1995. > > e-mail: phil_weiss@pdm-inc.com
  1996.  
  1997. I think he wants code: there are several articles in develop magazine
  1998. (with accompanying code) about this sort of thing. In particular, look at
  1999. issue 10, "Drawing in GWorlds for Speed and Versatility"
  2000.  
  2001. Dave Johnson
  2002.  
  2003. +++++++++++++++++++++++++++
  2004.  
  2005. >From raub@kushana.aero.ufl.edu (Mauricio Tavares)
  2006. Date: 10 Nov 1996 17:23:22 GMT
  2007. Organization: University of Florida
  2008.  
  2009. Roy Glikin (rmg19@mail.idt.net) wrote:
  2010. : The standard application to perform the functions you require is Adobe's
  2011. : Photoshop.  Even the LE versions, will perform these basic corrections.
  2012. : In article <phil_weiss-2410961622250001@ts02-10.dialup.ais.net>,
  2013. : phil_weiss@pdm-inc.com (Phil Weiss) wrote:
  2014. : >   Anyone know of a library or sources that will manipulate a PICT or PixMap?
  2015. : > 
  2016. : >   Especially, changing the brightness, contrast, or color?
  2017. : > 
  2018.     That may be so.  However, I do believe the original poster said
  2019. he wanted *a library* as opposite to *an application*.  When you say
  2020. library, you usually have a program you wrote (or is trying to) and you
  2021. would like to do some sort of manipulation without having to reinvent
  2022. the wheel.  For instance, someone creating an image processing program
  2023. may be interested in finding a wavelet/Fourier library.
  2024.  
  2025. -- 
  2026.  ===========================+==========================================
  2027. | Mauricio Tavares          | "We will attack...                       |
  2028. | raub@kushana.aero.ufl.edu |  ...under the cover of daylight!" Rimmer |
  2029.  ===========================+==========================================
  2030.  
  2031. +++++++++++++++++++++++++++
  2032.  
  2033. >From dce@netcom.com (David Elliott)
  2034. Date: Sun, 10 Nov 1996 17:47:58 GMT
  2035. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  2036.  
  2037. In article <56532b$km7@no-names.nerdc.ufl.edu>,
  2038. Mauricio Tavares <raub@kushana.aero.ufl.edu> wrote:
  2039. >Roy Glikin (rmg19@mail.idt.net) wrote:
  2040. >: The standard application to perform the functions you require is Adobe's
  2041. >: Photoshop.  Even the LE versions, will perform these basic corrections.
  2042. >: 
  2043. >: In article <phil_weiss-2410961622250001@ts02-10.dialup.ais.net>,
  2044. >: phil_weiss@pdm-inc.com (Phil Weiss) wrote:
  2045. >: 
  2046. >: >   Anyone know of a library or sources that will manipulate a PICT or PixMap?
  2047. >: > 
  2048. >: >   Especially, changing the brightness, contrast, or color?
  2049. >: > 
  2050. >    That may be so.  However, I do believe the original poster said
  2051. >he wanted *a library* as opposite to *an application*.  When you say
  2052. >library, you usually have a program you wrote (or is trying to) and you
  2053. >would like to do some sort of manipulation without having to reinvent
  2054. >the wheel.
  2055.  
  2056. True enough, but I don't think it's fair to come down on Roy this way.
  2057.  
  2058. Phil's mistake was to include comp.sys.mac.graphics in his newsgroups.
  2059. Comp.sys.mac.graphics is really not a programming newsgroup - it is
  2060. frequented by users of graphics applications.  Given that, Roy's answer
  2061. is not unexpected, despite the wording of the original question.
  2062.  
  2063. -- 
  2064. David Elliott - dce@netcom.com
  2065.  
  2066. Visit The Land of the Squishy - http://www.btw.com/dce/
  2067.  
  2068. ---------------------------
  2069.  
  2070. >From Thomas.Poetzl@studbox.uni-stuttgart.de (Thomas Pˆtzl)
  2071. Subject: Path to the preferences folder ?
  2072. Date: Sun, 10 Nov 1996 10:57:40 +0100
  2073. Organization: Comp.Center (RUS), U of Stuttgart, FRG
  2074.  
  2075. hello,
  2076.  
  2077. How can I get the path to the preferences folder without having the name
  2078. of the boot volume ?
  2079.  
  2080. Thanks for your help
  2081. Thomas
  2082.  
  2083. +++++++++++++++++++++++++++
  2084.  
  2085. >From Lev_Knopov@mail.stil.scitex.com (Lev Knopov)
  2086. Date: Sun, 10 Nov 1996 12:18:47 +0200
  2087. Organization: Scitex Corporation Ltd.
  2088.  
  2089. In article
  2090. <Thomas.Poetzl-1011961057400001@rusxppp148.rus.uni-stuttgart.de>,
  2091. Thomas.Poetzl@studbox.uni-stuttgart.de (Thomas Pˆtzl) wrote:
  2092.  
  2093. > hello,
  2094. > How can I get the path to the preferences folder without having the name
  2095. > of the boot volume ?
  2096. > Thanks for your help
  2097. > Thomas
  2098.  
  2099.  
  2100. Use 
  2101. pascal OSErr FindFolder(short vRefNum,OSType folderType,
  2102.                         Boolean createFolder, 
  2103.                         short *foundVRefNum, short *foundDirID); 
  2104.  
  2105. from Folders.h with kExtensionFolderType as folderType.
  2106.  
  2107. -- 
  2108.   //\\   Lev Knopov
  2109.   \\//   Scitex Israel
  2110. ///  \\\ Lev_Knopov@mail.stil.scitex.com
  2111.  
  2112. +++++++++++++++++++++++++++
  2113.  
  2114. >From David Gillies <daggilli@vader.brad.ac.uk>
  2115. Date: Mon, 11 Nov 1996 21:44:33 +0000
  2116. Organization: University of Bradford
  2117.  
  2118. Lev Knopov wrote:
  2119. > In article
  2120. > <Thomas.Poetzl-1011961057400001@rusxppp148.rus.uni-stuttgart.de>,
  2121. > Thomas.Poetzl@studbox.uni-stuttgart.de (Thomas Pˆtzl) wrote:
  2122. > > hello,
  2123. > >
  2124. > > How can I get the path to the preferences folder without having the name
  2125. > > of the boot volume ?
  2126. > >
  2127. > > Thanks for your help
  2128. > > Thomas
  2129. > Use
  2130. > pascal OSErr FindFolder(short vRefNum,OSType folderType,
  2131. >                         Boolean createFolder,
  2132. >                         short *foundVRefNum, short *foundDirID);
  2133. > from Folders.h with kExtensionFolderType as folderType.
  2134. Errm, that should be kPreferencesFolderType.
  2135. -- 
  2136. ______________________________________________________________________
  2137. David A. G. Gillies                        (daggilli@vader.brad.ac.uk)
  2138.       University of Bradford, Bradford, West Yorkshire, England
  2139. _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  2140.  
  2141. ---------------------------
  2142.  
  2143. >From carlos@sprynet.com (Carlos Gonzalez)
  2144. Subject: Problem w- PICT resource
  2145. Date: Mon, 11 Nov 1996 23:10:14 -0800
  2146. Organization: Sprynet News Service
  2147.  
  2148. Hello all,
  2149.  
  2150. I have what I believe to be a simple problem, and I hope someone has an
  2151. answer that will make me slap my forehead and say, "Duh!".  I am simply
  2152. loading a PICT from my resource file into an offscreen world and then
  2153. CopyBits-ing it to my main window.  This was working fine, but I then
  2154. changed the PICT, making it bigger inthe process.  The problem is that my
  2155. program seems to insist on using the old resource.  I say this because
  2156. when I copy to the main window, I get garbage in the regions where there
  2157. should be new image data.  I simply use GetPicture to load the PICT into
  2158. my offscreen world, and then I use good ol' CopyBits to copy from the
  2159. offscreen world to the main window.  I'm at my wit's end.  I've checked
  2160. all my Rects, and they're all correct.  I pass CopyBits what the new Rect
  2161. should be (that is, the new, larger image) but it only draws the old image
  2162. plus garbage.  I've tried creating a new resource, re-pasting the image
  2163. into it, and then using that new ID, but I get the same behavior.  Any
  2164. suggestions would be much appreciated.  Thank you very much.
  2165.  
  2166.  
  2167. Carlos Gonzalez
  2168. carlos@sprynet.com
  2169.  
  2170. +++++++++++++++++++++++++++
  2171.  
  2172. >From BHuey@worldnet.att.net (Hugh Johnson)
  2173. Date: Tue, 12 Nov 1996 09:04:23 -0500
  2174. Organization: AT&T WorldNet Services
  2175.  
  2176. In article <carlos-1111962310150001@206.175.97.3>, carlos@sprynet.com
  2177. (Carlos Gonzalez) wrote:
  2178.  
  2179. > Hello all,
  2180. > I have what I believe to be a simple problem, and I hope someone has an
  2181. > answer that will make me slap my forehead and say, "Duh!".  I am simply
  2182. > loading a PICT from my resource file into an offscreen world and then
  2183. > CopyBits-ing it to my main window.  This was working fine, but I then
  2184. > changed the PICT, making it bigger inthe process.  The problem is that my
  2185. > program seems to insist on using the old resource.  I say this because
  2186. > when I copy to the main window, I get garbage in the regions where there
  2187. > should be new image data.  I simply use GetPicture to load the PICT into
  2188. > my offscreen world, and then I use good ol' CopyBits to copy from the
  2189. > offscreen world to the main window.  I'm at my wit's end.  I've checked
  2190. > all my Rects, and they're all correct.  I pass CopyBits what the new Rect
  2191. > should be (that is, the new, larger image) but it only draws the old image
  2192. > plus garbage.  I've tried creating a new resource, re-pasting the image
  2193. > into it, and then using that new ID, but I get the same behavior.  Any
  2194. > suggestions would be much appreciated.  Thank you very much.
  2195.  
  2196. Check all your rects _again_, check them 3 times after that, and check 'em
  2197. once more for good measure.
  2198.  
  2199. If rects aren't the problem, then the only possible problem is that your
  2200. compiler isn't updating the copy of the PICT resource that it's using for
  2201. the DrawPicture call. Go into your "Make" command and make sure the
  2202. compiler knows that you've changed that resource!
  2203.  
  2204. -- 
  2205. The universe is a figment of it's own imagination.
  2206.  
  2207. +++++++++++++++++++++++++++
  2208.  
  2209. >From squires@crl.com (Scott Squires)
  2210. Date: Tue, 12 Nov 1996 07:48:16 -0800
  2211. Organization: Puffin Designs
  2212.  
  2213. In article <carlos-1111962310150001@206.175.97.3>,
  2214. carlos@sprynet.com (Carlos Gonzalez) wrote:
  2215.  
  2216. >Hello all,
  2217. >
  2218. >I have what I believe to be a simple problem, and I hope someone has an
  2219. >answer that will make me slap my forehead and say, "Duh!".  I am simply
  2220. >loading a PICT from my resource file into an offscreen world and then
  2221. >CopyBits-ing it to my main window.  This was working fine, but I then
  2222. >changed the PICT, making it bigger inthe process.  The problem is that my
  2223. >program seems to insist on using the old resource.  I say this because
  2224. >when I copy to the main window, I get garbage in the regions where there
  2225. >should be new image data.  I simply use GetPicture to load the PICT into
  2226. >my offscreen world, and then I use good ol' CopyBits to copy from the
  2227. >offscreen world to the main window.  I'm at my wit's end.  I've checked
  2228. >all my Rects, and they're all correct.  I pass CopyBits what the new Rect
  2229. >should be (that is, the new, larger image) but it only draws the old image
  2230. >plus garbage.  I've tried creating a new resource, re-pasting the image
  2231. >into it, and then using that new ID, but I get the same behavior.  Any
  2232. >suggestions would be much appreciated.  Thank you very much.
  2233.  
  2234. > The problem is that my
  2235. >program seems to insist on using the old resource.
  2236.  
  2237. Are you using the same PicHandle? Or modifying the picture resource
  2238. without saving it out?
  2239.  
  2240. >I get garbage in the regions where there
  2241. >should be new image data. 
  2242.  
  2243. Did you increase the size of the GWorld to the new picture size?
  2244. Try doing an EraseRect on the GWorld before copying the pict over.
  2245. Make sure you SetGWorld correctly before drawing.
  2246.  
  2247. -scott
  2248.  
  2249.  
  2250. Scott Squires               "Insert funny stuff here"
  2251. squires@crl.com
  2252. ScottSquir@aol.com
  2253.  
  2254.  
  2255. ---------------------------
  2256.  
  2257. >From amcclain@il-icom.net (Andrew W. McClain)
  2258. Subject: Questions about shareware copyrights
  2259. Date: Thu, 31 Oct 1996 18:29:26 -0500
  2260. Organization: Illinois Internet Communications, Inc.
  2261.  
  2262. How much does a shareware copyright cost, how does one get one, and is it
  2263. really necessary?
  2264.  
  2265. +++++++++++++++++++++++++++
  2266.  
  2267. >From jerry@fvc.com (Jerry Whitnell)
  2268. Date: Sat, 02 Nov 1996 19:36:24 -0800
  2269. Organization: First Virtual Corp
  2270.  
  2271. In article <amcclain-3110961829270001@206.62.101.63>, amcclain@il-icom.net (Andrew W. McClain) wrote:
  2272.  
  2273. > How much does a shareware copyright cost, how does one get one, and is it
  2274. > really necessary?
  2275.  
  2276. Run, do not walk, and buy a copy of Copyright Your Software by Stephen Fishman.  Published by Nolo Press, ISBN: 0-87337-260-3   http://www.nolo.com/item/cys.html.
  2277.  
  2278. -- 
  2279. Jerry Whitnell                               First Virtual Corp
  2280. jerry@fvc.com   ** I don't buy anything marketed by junk email. **
  2281.  
  2282. +++++++++++++++++++++++++++
  2283.  
  2284. >From wdh@fresh.com (Bill Hofmann)
  2285. Date: Sun, 03 Nov 1996 13:52:55 -0800
  2286. Organization: Cypress Research
  2287.  
  2288. In article <amcclain-3110961829270001@206.62.101.63>, amcclain@il-icom.net
  2289. (Andrew W. McClain) wrote:
  2290.  > How much does a shareware copyright cost, how does one get one, and is it
  2291.  > really necessary?
  2292.  
  2293. A copyright costs nothing, as other respondents have pointed out. 
  2294. Registering a copyright with the US Copyright Office costs $20 or so. 
  2295. It's fairly easy, and what it does (besides get you junk mail) is gives
  2296. you the right to collect punitive damages should someone pirate your work
  2297. (and you sue and win).  
  2298.  
  2299. What you should be sure to do is put "Copyright <date> <your name>"
  2300. somewhere in your program: the about box is one place, the 'vers' resource
  2301. another.  
  2302.  
  2303. Filing a copyright is easy, there's fairly clear documentation in the
  2304. packet you can get from the copyright office.  Essentially, you send a
  2305. copy of the source code.  You can omit portions if they contain trade
  2306. secrets, there are exact details in the documentation.
  2307.  
  2308. -Bill
  2309.  
  2310. +++++++++++++++++++++++++++
  2311.  
  2312. >From ajmas@worldnet.fr (Andre-John Mas)
  2313. Date: Mon, 4 Nov 1996 23:13:48 +0100
  2314. Organization: SCT / Worldnet - Internet Provider & Information Exchange - Paris, France
  2315.  
  2316. Andrew W. McClain <amcclain@il-icom.net> wrote:
  2317.  
  2318. > How much does a shareware copyright cost, how does one get one, and is it
  2319. > really necessary?
  2320.  
  2321. If I were to send my self a sealed registered letter, that I did not
  2322. open would that help me in a copyright case.  The registered letter
  2323. would contain everything to do with the software, source code, docs and
  2324. so on.
  2325.  
  2326. Thanks
  2327.  
  2328. Andre-John
  2329.  
  2330. --
  2331.  >------------------------------  ,,,, --------------------------------<
  2332.           Andre-John MAS         - -     Smail: 821, Chemin du Riou   
  2333.    Email : ajmas@worldnet.fr      L        06140 Vence, France      
  2334. >------------------------------   -   --------------------------------<
  2335.  Tel/Fax  : (00)(33)0493.24.64.90     http://myweb.worldnet.fr/~ajmas/
  2336.  
  2337. +++++++++++++++++++++++++++
  2338.  
  2339. >From Jackson Software Development <development@jacksoncorp.com>
  2340. Date: 5 Nov 1996 14:55:30 GMT
  2341. Organization: Jackson Software
  2342.  
  2343. In article <1996110423134820835@nice0-144.sct.fr> Andre-John Mas,
  2344. ajmas@worldnet.fr writes:
  2345. >If I were to send my self a sealed registered letter, that I did not
  2346. >open would that help me in a copyright case.  The registered letter
  2347. >would contain everything to do with the software, source code, docs and
  2348. >so on.
  2349.  
  2350. I don't know the law in France, and I barely know it in the US, but in
  2351. the US this doesn't gain you anything from what I've heard. If you're
  2352. going to spend the money to send yourself registered mail, just spend the
  2353. extra couple of dollars and register it with Copyright office.
  2354.  
  2355. Darrin
  2356.  
  2357. +++++++++++++++++++++++++++
  2358.  
  2359. >From dricklin@nesc.org
  2360. Date: 8 Nov 1996 20:51:07 GMT
  2361. Organization: Deja News USENET Posting Service
  2362.  
  2363. In article <55nkh2$5fp@kirin.wwa.com>, Jackson Software Development <development@jacksoncorp.com> wrote:
  2364.  
  2365. > In article <1996110423134820835@nice0-144.sct.fr> Andre-John Mas,
  2366. > ajmas@worldnet.fr writes:
  2367. > >If I were to send my self a sealed registered letter, that I did not
  2368. > >open would that help me in a copyright case.  The registered letter
  2369. > >would contain everything to do with the software, source code, docs and
  2370. > >so on.
  2371. > I don't know the law in France, and I barely know it in the US, but in
  2372. > the US this doesn't gain you anything from what I've heard. If you're
  2373. > going to spend the money to send yourself registered mail, just spend the
  2374. > extra couple of dollars and register it with Copyright office.
  2375. > Darrin
  2376. Where the sending yourself registered mail works, is to establish piority of an 
  2377. idea. More often used with patentable ideas than copyrights per se. It can still 
  2378. be helpful in a lawsuit to establish priority of ownership. It is a standard 
  2379. practice for r&d places to do this even while persuing a registered copyright or 
  2380. patent. helps keep you covered while the paper work is processed. THe pont is only 
  2381. the judge gets to open the independently ( by postal system) date stamped sealed
  2382. envelope. 
  2383.  
  2384. Donald R Ricklin
  2385. http://www.nesc.org/~dricklin
  2386.  
  2387. - ---------------------------------------------------------------------
  2388. This article was posted to Usenet via the Posting Service at Deja News:
  2389. http://www.dejanews.com/           [Search, Post, and Read Usenet News]
  2390.  
  2391. +++++++++++++++++++++++++++
  2392.  
  2393. >From Michael_Kamensky@lamg.com (Michael Kamensky)
  2394. Date: 10 Nov 1996 08:43:35 GMT
  2395. Organization: Los Angeles Macintosh Group BBS
  2396.  
  2397. dricklin@nesc.org,Internet writes:
  2398. In article <55nkh2$5fp@kirin.wwa.com>, Jackson Software Development
  2399. <development@jacksoncorp.com> wrote:
  2400.  
  2401. > In article <1996110423134820835@nice0-144.sct.fr> Andre-John Mas,
  2402. > ajmas@worldnet.fr writes:
  2403. > >If I were to send my self a sealed registered letter, that I did not
  2404. > >open would that help me in a copyright case.  The registered letter
  2405. > >would contain everything to do with the software, source code, docs and
  2406. > >so on.
  2407. > I don't know the law in France, and I barely know it in the US, but in
  2408. > the US this doesn't gain you anything from what I've heard. If you're
  2409. > going to spend the money to send yourself registered mail, just spend the
  2410. > extra couple of dollars and register it with Copyright office.
  2411. > Darrin
  2412. Where the sending yourself registered mail works, is to establish piority of
  2413. an 
  2414. idea. More often used with patentable ideas than copyrights per se. It can
  2415. still 
  2416. be helpful in a lawsuit to establish priority of ownership. It is a standard 
  2417. practice for r&d places to do this even while persuing a registered copyright
  2418. or 
  2419. patent. helps keep you covered while the paper work is processed. THe pont is
  2420. only 
  2421. the judge gets to open the independently ( by postal system) date stamped
  2422. sealed
  2423. envelope.
  2424. - -----------------
  2425.  
  2426. I agree with this, I come from a freelance writing background and authors
  2427. often do this to establish a kind of "born-on" date for their work (god, I'm
  2428. going to get sick of that term from all the beer commercials!). Under current
  2429. copyright law, any original idea or work is immediately protected by
  2430. copyright once it's put in the format of a fixed media (words on paper, bits
  2431. on disk, etc.) Registering with the Copyright Office and mailing things back
  2432. to yourself primarily helps to establish ownership of a property in case of
  2433. an infringement.
  2434.  
  2435. -Michael
  2436.  
  2437. ---------------------------
  2438.  
  2439. >From cramer@nwlink.com (Tim Cramer)
  2440. Subject: QuickBASIC can't handle 32bit adressing
  2441. Date: Fri, 01 Nov 1996 11:55:10 -0700
  2442. Organization: Northwest Link
  2443.  
  2444. I apology to any who read this for using a non-popular language, but I
  2445. have an extensive collection of MS QuickBasic programs, and converting
  2446. them all would be a huge project.  Microsoft seems to have pushed this
  2447. product from its corporate mind. 
  2448.  
  2449. When loading a Basic program from the desktop with 32 bit addressing
  2450. enabled, an immediate error 1 occurs.  Does anyone have a patch or
  2451. workaround?
  2452.  
  2453. Thanks for your patience.
  2454.  
  2455. +++++++++++++++++++++++++++
  2456.  
  2457. >From dstone@chem.utoronto.ca (David Stone)
  2458. Date: Mon, 4 Nov 1996 14:05:51 GMT
  2459. Organization: University of Toronto Chemistry
  2460.  
  2461. In article <cramer-0111961155100001@ip024.tu1.nwlink.com>,
  2462. cramer@nwlink.com (Tim Cramer) wrote:
  2463. > I apology to any who read this for using a non-popular language, but I
  2464. > have an extensive collection of MS QuickBasic programs, and converting
  2465. > them all would be a huge project.  Microsoft seems to have pushed this
  2466. > product from its corporate mind. 
  2467. > When loading a Basic program from the desktop with 32 bit addressing
  2468. > enabled, an immediate error 1 occurs.  Does anyone have a patch or
  2469. > workaround?
  2470.  
  2471.  
  2472. I've seen a number of people refer to a product called FutureBASIC.  Your
  2473. best bet is probably to track this down and use it instead.  You may
  2474. have some recoding to do of your libraries, but it will undoubtedly be
  2475. quicker than rewriting them all in Pascal or C/C++.  
  2476.  
  2477. Dave Stone
  2478.  
  2479. +++++++++++++++++++++++++++
  2480.  
  2481. >From "Tedd F. Sperling" <sperling@sperling.com>
  2482. Date: Mon, 04 Nov 1996 21:36:50 +0000
  2483. Organization: Sperling Corporation
  2484.  
  2485. David Stone wrote:
  2486. > In article <cramer-0111961155100001@ip024.tu1.nwlink.com>,
  2487. > cramer@nwlink.com (Tim Cramer) wrote:
  2488. > >
  2489. > > I apology to any who read this for using a non-popular language, but I
  2490. > > have an extensive collection of MS QuickBasic programs, and converting
  2491. > > them all would be a huge project.  Microsoft seems to have pushed this
  2492. > > product from its corporate mind.
  2493. > >
  2494. > > When loading a Basic program from the desktop with 32 bit addressing
  2495. > > enabled, an immediate error 1 occurs.  Does anyone have a patch or
  2496. > > workaround?
  2497. > >
  2498. > I've seen a number of people refer to a product called FutureBASIC.  Your
  2499. > best bet is probably to track this down and use it instead.  You may
  2500. > have some recoding to do of your libraries, but it will undoubtedly be
  2501. > quicker than rewriting them all in Pascal or C/C++.
  2502. > Dave Stone
  2503.  
  2504. -- 
  2505.  
  2506. Hi:
  2507.  
  2508. Dave is right. Check out:
  2509.  
  2510. http://www.stazsoftware.com/
  2511.  
  2512. I highly recommend the language.
  2513.  
  2514.  
  2515. tedd
  2516.  
  2517.  
  2518.    ____
  2519.   |[  ]| mac programmer                             tedd f. sperling
  2520.   |[__]|                               mailto: sperling@sperling.com
  2521.   |___-|                http://www.sojourn.com/~sperling/resume.html
  2522. - -
  2523.  
  2524. +++++++++++++++++++++++++++
  2525.  
  2526. >From neuron@rtt@synapse.net (neuron)
  2527. Date: 6 Nov 1996 07:13:29 GMT
  2528. Organization: neuron, technology consultants
  2529.  
  2530. I wonder if there is any way to host QBasic on a Macintosh with 32 bit
  2531. operation, Virtual Memory and the 68040 caches all in operation at the
  2532. same time.
  2533.  
  2534. It would seem to me that if one can host emulators and such in the
  2535. environment, there surely must be some way to do this for QBasic.
  2536.  
  2537. Anyone care to comment? Any ideas? What kind of a run time environment
  2538. would we need to create? How would we trap the QBasic calls to the OS
  2539. and then make them call the OS in a clean manner?
  2540.  
  2541. Would there anyone interested in colaborating on such a project?
  2542.  
  2543. Regards, rtt.
  2544.  
  2545. This MIND left BLANK Intentionally!
  2546.  
  2547. +++++++++++++++++++++++++++
  2548.  
  2549. >From bruneau@mich.com
  2550. Date: 9 Nov 96 19:27:37 -0500
  2551. Organization: mich.com, Inc. Farmington, MI
  2552.  
  2553.  
  2554. --Cyberdog-AltBoundary-0001587A
  2555. Content-Type: text/plain; charset=ISO-8859-1
  2556. Content-Transfer-Encoding: quoted-printable
  2557.  
  2558. We all hate "Me too" posts, but I just must say that FutureBasic is
  2559. the best thing that ever happened to me Mac-wise. 
  2560.  
  2561. I want to let any beginning Mac programmers that this product is
  2562. perhaps the best $200 or so that you can spend. Learn the Mac Toolbox
  2563. and modular programming without having to learn C on top of it. I
  2564. never could have done the things I've done on a Mac without it, and it
  2565. comes with full printed documentation, and the best, most immediate
  2566. tech support you're likely to find anyware, included free.
  2567.  
  2568. I ramble like this because I had never even heard of this development
  2569. environment before my boss showed me a direct mailing he had received
  2570. from Staz Software, and it seems a crime that more programmers perhaps
  2571. aren't aware of this excellent, real live Mac application-producing
  2572. environment with line-by-line debugging and MacsBug support.
  2573.  
  2574. PB
  2575.  
  2576.  
  2577. --Cyberdog-AltBoundary-0001587A
  2578. Content-Type: multipart/mixed; boundary="Cyberdog-MixedBoundary-0001587A"
  2579. Content-Transfer-Encoding: 7bit
  2580.  
  2581.  
  2582. --Cyberdog-MixedBoundary-0001587A
  2583. Content-Type: text/enriched; charset=ISO-8859-1
  2584. Content-Transfer-Encoding: quoted-printable
  2585.  
  2586. <X-FONTSIZE><PARAM>12</PARAM><FONTFAMILY><PARAM>Geneva</PARAM>We all
  2587. hate "Me too" posts, but I just must say that FutureBasic is the best
  2588. thing that ever happened to me Mac-wise. 
  2589.  
  2590.  
  2591. I want to let any beginning Mac programmers that this product is
  2592. perhaps the best $200 or so that you can spend. Learn the Mac Toolbox
  2593. and modular programming without having to learn C on top of it. I
  2594. never could have done the things I've done on a Mac without it, and it
  2595. comes with full printed documentation, and the best, most immediate
  2596. tech support you're likely to find anyware, included free.
  2597.  
  2598.  
  2599. I ramble like this because I had never even heard of this development
  2600. environment before my boss showed me a direct mailing he had received
  2601. from Staz Software, and it seems a crime that more programmers perhaps
  2602. aren't aware of this excellent, real live Mac application-producing
  2603. environment with line-by-line debugging and MacsBug support.
  2604.  
  2605.  
  2606. PB</FONTFAMILY></X-FONTSIZE>
  2607. --Cyberdog-MixedBoundary-0001587A--
  2608.  
  2609. --Cyberdog-AltBoundary-0001587A--
  2610.  
  2611.  
  2612. ---------------------------
  2613.  
  2614. >From slur@world.std.com (Scott Lahteine)
  2615. Subject: SpriteWorld 2 kludges and add-ons
  2616. Date: Tue, 5 Nov 1996 01:10:38 GMT
  2617. Organization: Hot Eggs
  2618.  
  2619. Hi!
  2620.  
  2621.      I've been playing around with SpriteWorld 2 of late and enjoying the
  2622. ease at last.  I'm wondering if anyone has patched it for special purpose
  2623. stuff.  As an example, I wrote a routine to make a PICT into a sprite,
  2624. then use that sprite to fill the background grafport (with an optional
  2625. cliprect for good measure).  It's built around this little thing:
  2626.  
  2627. void DrawSpriteToBack(SpriteWorldPtr pSW, SpritePtr pSprite)
  2628. {
  2629.      (*pSprite->frameDrawProc)
  2630.           (pSprite->curFrameP, pSW->backFrameP,
  2631.           &pSprite->curFrameP->frameRect, &pSprite->destFrameRect);
  2632. }
  2633.  
  2634.  
  2635.      You just offset the rect as you go in a 2D loop, then SWUpdateSpriteWorld.
  2636.  
  2637. --
  2638.      For the program I'm working on I need to do a major patch that lets
  2639. you specify what part of a "virtual bitmap" is displayed in the window. 
  2640. The single x-y offset is subtracted from the coordinates of all sprites as
  2641. they're drawn.
  2642.  
  2643.      This is only practical for displays made up entirely of sprites, like
  2644. a huge scrolling spacefield.  And the limit in size: 65536 x 65536 (about
  2645. 100 x 80 screens).
  2646.  
  2647.      Of course it isn't working yet!  But it's one of those neat ideas so
  2648. I thought I'd throw it out there.
  2649.  
  2650. --
  2651.      Another useful routine makes a display out of a group of sprites
  2652. using a table, draws one frame, then stamps it on the background and
  2653. disposes of the sprites.  This is a nifty way to make static backgrounds
  2654. that are a little more flexible than fixed-size tiles.
  2655.  
  2656. --
  2657.      Coming from an Amiga world I appreciate finding SpriteWorld just as I
  2658. arrived in MacLand.  With a few more patches it would make a worthy system
  2659. extension, no?  Anyone feel like getting up a petition? :)
  2660. -- 
  2661. - scott                             slur@world.std.com
  2662.  
  2663.        "A painting of a rice cake does not satisfy hunger."
  2664.  
  2665. +++++++++++++++++++++++++++
  2666.  
  2667. >From mburch@ambrosiasw.com (Matt Burch)
  2668. Date: Tue, 05 Nov 1996 13:32:26 -0700
  2669. Organization: Ambrosia Software
  2670.  
  2671. In article <slur-0411962011430001@ppp0a005.std.com>, slur@world.std.com
  2672. (Scott Lahteine) wrote:
  2673.  
  2674. >      I've been playing around with SpriteWorld 2 of late and enjoying the
  2675. > ease at last.  I'm wondering if anyone has patched it for special purpose
  2676. > stuff.
  2677.  
  2678. I haven't delved into it much, but for my next project I'm looking at
  2679. writing a 16-bit version of the animated starfield functions, so you can
  2680. call something equivalent to SWAnimate8BitStarfield and have it work in 16
  2681. bits. When I get time, that is. :)
  2682.  
  2683. - --------------------------------------------------------------------
  2684. Matt Burch            |   Associate Thaumaturgist, Ambrosia Software
  2685. mburch@ambrosiasw.com | "If it's not on fire, it's a software problem"
  2686. - --------------------------------------------------------------------
  2687.  
  2688. +++++++++++++++++++++++++++
  2689.  
  2690. >From hinoue@stimpy.us.itd.umich.edu (Hajime Inoue)
  2691. Date: 7 Nov 1996 00:41:30 GMT
  2692. Organization: University of Michigan EECS
  2693.  
  2694. Scott Lahteine (slur@world.std.com) wrote:
  2695. :      I've been playing around with SpriteWorld 2 of late and enjoying the
  2696. : ease at last.  I'm wondering if anyone has patched it for special purpose
  2697. : stuff.  
  2698.  
  2699. I've been playing around with it to create a simple tank game.  It scrolls
  2700. with a background of tiles.  In order for the sprites to interact with the
  2701. tiles though, I've written a function that checks for a region collision
  2702. between the sprite's location and the tile.  Unfortunately, there's a bug.
  2703. I'm not sure why, but it doesn't work for all my tiles.  I'd be grateful
  2704. if someone could point out my mistake.  The listing is below.
  2705.  
  2706. My game also has a little health bar (alot like Command and Conquer) for
  2707. the sprites that don't die with one hit.  In order to do this I have a
  2708. sprite that's just a rectangular pict with a 3d frame.  I have a custom
  2709. drawing function that just calls the regular BlitPixieRoutine and then
  2710. using PaintRect to draw the health of the player.  This doesn't work well
  2711. unless I draw the sprite every frame.  Does someone know a better way?
  2712.  
  2713. Here's the code for checking a tile's mask against a sprites:
  2714. Boolean CheckCollision(SpriteWorldPtr spriteWorldP, SpritePtr srcSpriteP)
  2715. {
  2716.     Rect    SpriteRect;
  2717.     short    top,
  2718.         bottom,
  2719.         left,
  2720.         right;
  2721.     
  2722.     short    tileID;
  2723.     
  2724.     short    x,
  2725.         y;
  2726.     
  2727.     Rect    rgnRect;
  2728.     
  2729.     Boolean hasCollided = false;
  2730.     
  2731.     FramePtr    tileFrameP;
  2732.     
  2733.     Rect        test;
  2734.     
  2735.     top = srcSpriteP->destFrameRect.top / spriteWorldP->tileHeight;
  2736.     bottom = srcSpriteP->destFrameRect.bottom /
  2737.         spriteWorldP->tileHeight;
  2738.     
  2739.     left = srcSpriteP->destFrameRect.left / spriteWorldP->tileWidth;
  2740.     right = srcSpriteP->destFrameRect.right / spriteWorldP->tileWidth;
  2741.     
  2742.     if (bottom >= kTileMapRows )
  2743.         bottom = kTileMapRows-1;
  2744.     
  2745.     if (top < 0 )
  2746.         top = 0;
  2747.                 
  2748.     if (right >= kTileMapCols )
  2749.         right = kTileMapCols-1;
  2750.             
  2751.     if ( left < 0 )
  2752.         left = 0;
  2753.         
  2754.     for(y=top; y <= bottom; y++)
  2755.         for(x=left; x <= right; x++)
  2756.         {
  2757.             tileID = spriteWorldP->tileMap[y][x];
  2758.             tileFrameP =
  2759.     spriteWorldP->tileFrameArray[spriteWorldP->curTileImage[tileID]];
  2760.             
  2761.             // Deal with tiles that have masks
  2762.             if ( !(tileFrameP->maskPort == NULL &&
  2763.                 tileFrameP->maskRgn == NULL &&
  2764.                 tileFrameP->tileMaskIsSolid == false) )
  2765.             {
  2766.  
  2767.                 // Try moving sprite region mask to new
  2768.                 // location
  2769.                 rgnRect =
  2770.                 (**srcSpriteP->curFrameP->maskRgn).rgnBBox;
  2771.  
  2772.                 OffsetRgn(srcSpriteP->curFrameP->maskRgn,
  2773.                     (srcSpriteP->destFrameRect.left -
  2774.                     rgnRect.left) +
  2775.                     srcSpriteP->curFrameP->offsetPoint.h,
  2776.                     (srcSpriteP->destFrameRect.top -
  2777.                     rgnRect.top) +
  2778.                     srcSpriteP->curFrameP->offsetPoint.v);
  2779.                 // Try moving tile sprite region mask to
  2780.                 // new location
  2781.                 CopyRgn( tileFrameP->maskRgn,
  2782. i                    gCollisionSpareRgn );
  2783.  
  2784.                 rgnRect = (**gCollisionSpareRgn).rgnBBox;
  2785.                 
  2786.                 (**gCollisionSpareRgn).rgnBBox.top =
  2787. (**tileFrameP->maskRgn).rgnBBox.top + y*spriteWorldP->tileHeight;
  2788.                 (**gCollisionSpareRgn).rgnBBox.bottom =
  2789. (**tileFrameP->maskRgn).rgnBBox.bottom + y*spriteWorldP->tileHeight;
  2790.                 (**gCollisionSpareRgn).rgnBBox.left =
  2791. (**tileFrameP->maskRgn).rgnBBox.left + x*spriteWorldP->tileWidth;
  2792.                 (**gCollisionSpareRgn).rgnBBox.right =
  2793. (**tileFrameP->maskRgn).rgnBBox.right + x*spriteWorldP->tileWidth;
  2794.                 
  2795.                 SectRgn(srcSpriteP->curFrameP->maskRgn,
  2796.                 gCollisionSpareRgn, gCollisionSectRgn);
  2797.                 
  2798.                 if ( !EmptyRgn(gCollisionSectRgn))
  2799.                 {
  2800.                     hasCollided = true;
  2801.                     // For testing purposes
  2802.                 //    SWDrawTile(spriteWorldP, y, x,
  2803.                     kBlank);
  2804.                 }            
  2805.                 
  2806.             }
  2807.             
  2808.         }
  2809.     return hasCollided;
  2810.  
  2811. And thanks to Tony, Karl, and Vern for such a great animation library.
  2812. Writing my own scrolling routines was killing me...
  2813.  
  2814. -- 
  2815. -Have Fun!
  2816. - ----------------------------------------------------
  2817. *  Hajime (Jim) Inoue    *  University of Michigan    *
  2818. *  hinoue@umich.edu    *  Undergrad Biophysics         *
  2819. - ----------------------------------------------------
  2820.  
  2821. ---------------------------
  2822.  
  2823. >From James Munroe and Tricia O'Neill <eccles@astral.magic.ca>
  2824. Subject: String concatenation to pass to DrawString
  2825. Date: Wed, 06 Nov 1996 13:57:32 +0000
  2826. Organization: Total Net
  2827.  
  2828. How do you concatenate a string to pass to DrawString()? Sometimes it's 
  2829. really useful for me to quickly create a dialog box or a window where some 
  2830. subroutine performs a numerical calculation and converts the result to a 
  2831. string literal. I can do that, but would rather not have to call 
  2832. DrawString() twice. For instance, in AppleScript the syntax for 
  2833. concatenating the string equivalent of a numerical calculation's result to an 
  2834. existing text string would be, for instance,
  2835.  
  2836. display dialog "The square root of " & y & " is " & ((y ^ 0.5) as string)
  2837.  
  2838. My question centres around the C/C++ equivalent of the "&" operator, for 
  2839. concatenation. I have tried using the "cout << " syntax, but this 
  2840. <iostream.h> function doesn't seem to be compatible with calls to the Mac 
  2841. Toolbox. If anyone can help, please e-mail me at
  2842. eccles@astral.magic.ca
  2843. or reply via this newsgroup - I will be checking it regularly.
  2844.  
  2845. Many thanks!
  2846.  
  2847. James.
  2848.  
  2849. +++++++++++++++++++++++++++
  2850.  
  2851. >From Anders.Wahlin@hum.gu.se (Anders Wahlin)
  2852. Date: Thu, 07 Nov 1996 09:56:49 +0100
  2853. Organization: HDS
  2854.  
  2855. In article <3280994C.1A93@astral.magic.ca>, James Munroe and Tricia
  2856. O'Neill <eccles@astral.magic.ca> wrote:
  2857.  
  2858. > How do you concatenate a string to pass to DrawString()?
  2859.  
  2860. Try this:
  2861.  
  2862. void  CatToTheEnd(Str255 mainString, Str255 newString) {
  2863.    short i, j;
  2864.  
  2865.    if (((j = newString[0]) + mainString[0]) > 255)
  2866.       j = 255 - mainString[0];
  2867.          /* Limit dest string to 255. */
  2868.  
  2869.    for (i = 0; i < j;) mainString[++mainString[0]] = newString[++i];
  2870. }
  2871.  
  2872.  
  2873. /Anders W.
  2874.  
  2875. +++++++++++++++++++++++++++
  2876.  
  2877. >From carl.gustafson@no.spam.welcome (Carl Gustafson)
  2878. Date: Mon, 11 Nov 1996 09:41:29 -0500
  2879. Organization: Imaging and Computer Vision Center, Drexel University
  2880.  
  2881. In article <3280994C.1A93@astral.magic.ca>, James Munroe and Tricia
  2882. O'Neill <eccles@astral.magic.ca> wrote:
  2883.  
  2884. > How do you concatenate a string to pass to DrawString()? Sometimes it's 
  2885. [snip]
  2886. > My question centres around the C/C++ equivalent of the "&" operator, for 
  2887. > concatenation. I have tried using the "cout << " syntax, but this 
  2888. > <iostream.h> function doesn't seem to be compatible with calls to the Mac 
  2889. > Toolbox.
  2890.  
  2891. Presumably, you have Pascal-style strings you want to catenate. You can do
  2892. this the brute-force way, using a loop (or even BlockMoveData) to move
  2893. string B onto the end of string A, and fix up the length byte, or you can
  2894. use another brute force way by converting the strings to C-style strings
  2895. (p2cstr), catenating, and converting back (c2pstr).
  2896.  
  2897. HTH
  2898.  
  2899. -- 
  2900. Carl Gustafson
  2901. carl.gustafson at ece.drexel.edu
  2902. (busily trying to avoid spammers)
  2903. Imaging and Computer Vision Center
  2904. Drexel University, Philadelphia, Penna
  2905. - ----------------------------------------------------------
  2906. I don't speak for Drexel, and Drexel doesn't listen to me...
  2907.  
  2908. ---------------------------
  2909.  
  2910. >From David Scott <dscott@west.net>
  2911. Subject: SysBeep and PMac
  2912. Date: Thu, 31 Oct 1996 16:28:34 +0000
  2913. Organization: West.Net Communications
  2914.  
  2915. I have some code that I previously only run on a 68k machine. Just
  2916. before the program ends I have two calls to SysBeep.  When I run the
  2917. program on a Power Mac, only one of the beeps sound and it seems to be
  2918. only a portion of the sound.
  2919.  
  2920. I've been searching in IM and TechNotes but have not yet come up with
  2921. the answer.
  2922.  
  2923. Thank you.
  2924. -- 
  2925.  
  2926.  David Scott
  2927.  
  2928.  Photography     http://www.west.net/~dscott
  2929.  
  2930.  
  2931. +++++++++++++++++++++++++++
  2932.  
  2933. >From Jonathan Bamber <Jonathan@marsbzz.demon.co.uk>
  2934. Date: Mon, 04 Nov 1996 10:58:38 +0000
  2935. Organization: J S Bamber PC Upgrades
  2936.  
  2937. Abigale wrote:
  2938. > This is not a problem with your powerMac it's the new sound Manager (your
  2939. > PowerMac will be using a later OS than your old Mac or at least will have
  2940. > the new sound manager). System Beeps are now played async, you get control
  2941. > back after it is called. putting a delay will cure this, or open your own
  2942. > sound channel and play the sound sync.
  2943. > Dave
  2944. > In article <3278D3AF.6F7E@west.net>, dscott@west.net wrote:
  2945. > > I have some code that I previously only run on a 68k machine. Just
  2946. > > before the program ends I have two calls to SysBeep.  When I run the
  2947. > > program on a Power Mac, only one of the beeps sound and it seems to be
  2948. > > only a portion of the sound.
  2949. > >
  2950. > > I've been searching in IM and TechNotes but have not yet come up with
  2951. > > the answer.
  2952. > --
  2953. > *** Libel Note :- any comments made are purely my personal opinions ***
  2954.  
  2955. this Dave talks a load of crap, get it together man.
  2956.  
  2957. the answer is  to install wick46
  2958.  
  2959.  
  2960.  
  2961. -- 
  2962. ====================================================
  2963. Tel: 01772 788091 Orange Mobile: 0976 239495
  2964. http://www.marsbzz.demon.co.uk/
  2965. Pager: set modem to: 8N1 (2400speed+) at 0973 100 602
  2966. Backup web site: http://cool.virtual-pc.com/alien/
  2967. JSBamber BBS 01772 788091 (8N1) at 9.30a.m. till
  2968. 6.00p.m. Sunday only, please email for password.
  2969.  
  2970. +++++++++++++++++++++++++++
  2971.  
  2972. >From mrmac@dircon.co.uk (Abigale)
  2973. Date: 3 Nov 1996 15:40:16 GMT
  2974. Organization: Direct Connection
  2975.  
  2976. This is not a problem with your powerMac it's the new sound Manager (your
  2977. PowerMac will be using a later OS than your old Mac or at least will have
  2978. the new sound manager). System Beeps are now played async, you get control
  2979. back after it is called. putting a delay will cure this, or open your own
  2980. sound channel and play the sound sync.
  2981.  
  2982. Dave
  2983.  
  2984.  
  2985.  
  2986.  
  2987.  
  2988.  
  2989. In article <3278D3AF.6F7E@west.net>, dscott@west.net wrote:
  2990.  
  2991. > I have some code that I previously only run on a 68k machine. Just
  2992. > before the program ends I have two calls to SysBeep.  When I run the
  2993. > program on a Power Mac, only one of the beeps sound and it seems to be
  2994. > only a portion of the sound.
  2995. > I've been searching in IM and TechNotes but have not yet come up with
  2996. > the answer.
  2997.  
  2998. -- 
  2999.  
  3000. *** Libel Note :- any comments made are purely my personal opinions ***
  3001.  
  3002. +++++++++++++++++++++++++++
  3003.  
  3004. >From andrewwelc@aol.com (AndrewWelc)
  3005. Date: 2 Nov 1996 08:29:58 -0500
  3006. Organization: America Online, Inc. (1-800-827-6364)
  3007.  
  3008. > I have some code that I previously only run on a 68k machine. Just
  3009. before
  3010. > the program ends I have two calls to SysBeep.  When I run the program on
  3011. > a Power Mac, only one of the beeps sound and it seems to be only a
  3012. > portion of the sound.
  3013.  
  3014. Ya -- SysBeep() is asynch now.  You'll get control back immediately after
  3015. calling it.
  3016.  
  3017. +--------------------------------------------------------------+
  3018. |    Andrew Welch - Thaumaturgist - Ambrosia Software, Inc.    |
  3019. +-------------------------------+------------------------------+
  3020. |    AOL-> Keyword: Ambrosia    |  http://www.AmbrosiaSW.com/  |
  3021. |    CIS-> GO word: Ambrosia    |   ftp://ftp.AmbrosiaSW.com/  |
  3022. +-------------------------------+------------------------------+
  3023.  
  3024. +++++++++++++++++++++++++++
  3025.  
  3026. >From mathews@dev.theatrix.com (Robert L Mathews)
  3027. Date: Fri, 08 Nov 1996 16:45:38 -0800
  3028. Organization: Theatrix Interactive
  3029.  
  3030. In article <3278D3AF.6F7E@west.net>, dscott@west.net wrote:
  3031.  
  3032. > I have some code that I previously only run on a 68k machine. Just
  3033. > before the program ends I have two calls to SysBeep.  When I run the
  3034. > program on a Power Mac, only one of the beeps sound and it seems to be
  3035. > only a portion of the sound.
  3036. > I've been searching in IM and TechNotes but have not yet come up with
  3037. > the answer.
  3038. > Thank you.
  3039.  
  3040. Recent versions of the Mac OS use the Sound Manager to play asynchronous
  3041. beep sounds, meaning your code regains control before the beep sound has
  3042. finished. When your app quits, the Sound Manager terminates any sound in
  3043. progress.
  3044.  
  3045. ---------------------------
  3046.  
  3047. >From Stef <stefan.kuypers@ping.be>
  3048. Subject: THPrint fields for Laserwriter 8?
  3049. Date: Mon, 04 Nov 1996 14:39:17 +0100
  3050. Organization: HOSTE NV
  3051.  
  3052. Hi,
  3053.  
  3054. I'm currently developing a utility that needs to set some printer
  3055. settings. Could you give me a list of what all the fields in the PrintX
  3056. array stand for? We are using a script for that right now but it has to
  3057. be re implemented in C++.
  3058.  
  3059. I actually have to be able to set the following things (I have the name
  3060. of the fields from the Apple script):
  3061.  
  3062. data format (binary)
  3063. graphics smoothing
  3064. halftone screen
  3065. include blank pages
  3066. print quality
  3067. reduce or enlarge
  3068. resolution
  3069. font substitution
  3070. print colors as grays
  3071. separation
  3072. orientation
  3073. flip horizontal
  3074. flip vertical
  3075. paper width
  3076. registration marks
  3077. printer type
  3078. print spreads
  3079.  
  3080. I hope someone can help me out with this or at least direct me to where
  3081. I have to look for it.
  3082.  
  3083. Thanks in advance,
  3084. Stef
  3085.  
  3086. +++++++++++++++++++++++++++
  3087.  
  3088. >From ldo@waikato.ac.nz (Lawrence D'Oliveiro)
  3089. Date: Thu, 07 Nov 1996 16:02:40 +1300
  3090. Organization: University of Waikato
  3091.  
  3092. In article <327DF202.3094@ping.be>, stefan.kuypers@ping.be wrote:
  3093.  
  3094. >I'm currently developing a utility that needs to set some printer
  3095. >settings.
  3096.  
  3097. Have you considered QuickDraw GX
  3098. <http://www2.waikato.ac.nz/ldo/gx/printobjects.html>?
  3099.  
  3100. +++++++++++++++++++++++++++
  3101.  
  3102. >From miked@ittpub.nl (Mike Davis)
  3103. Date: Fri, 08 Nov 1996 09:26:59 +0200
  3104. Organization: ITT Publitec bv, Amsterdam, The Netherlands.
  3105.  
  3106. In article <ldo-0711961602400001@mhacking-tosh-ii.cc.waikato.ac.nz>,
  3107. ldo@waikato.ac.nz wrote:
  3108.  
  3109. > In article <327DF202.3094@ping.be>, stefan.kuypers@ping.be wrote:
  3110. > >I'm currently developing a utility that needs to set some printer
  3111. > >settings.
  3112. > Have you considered QuickDraw GX
  3113. > <http://www2.waikato.ac.nz/ldo/gx/printobjects.html>?
  3114.  
  3115. Adobe publish a header file for the LaserWriter 8 printer driver. It's on
  3116. their developer CDs and perhaps at their web site.
  3117.  
  3118. If you actually need to read a PPD file then I'd forget Adobe's code. I
  3119. can't even get the code to run with GCC on NeXTSTEP (BSD), not that I
  3120. really need to since NeXTSTEP has one anyway. I ended up writing my own
  3121. PPD parsing library for Macintosh which was rather a pain.
  3122.  
  3123. The header file is also illegal with C++, according to CodeWarrior, so I
  3124. had to turn some warnings off. This isn't something I like to do.
  3125.  
  3126. ---------------------------
  3127.  
  3128. >From matt@colorpar.com (Matt Gieselman)
  3129. Subject: Time Manager Question...
  3130. Date: Mon, 28 Oct 1996 14:59:07 -0800
  3131. Organization: The Color Partnership
  3132.  
  3133. Hey,
  3134.  
  3135. I have the following code for doing animated cursors.  The idea is that
  3136. DoAnimation gets called every so often by the time manager.  Well it all
  3137. looks ok to me but nothing ever happens, do Animation never gets called.
  3138. If anyone has any ideas or has used the time manager successfully any
  3139. help would be appreciated.  Please email any idea's.
  3140.  
  3141. Thanks,
  3142. Matt
  3143.  
  3144. =-=-=-=-=-=-=-=-=-=-=-=
  3145.  
  3146. pascal void DoAnimation( void );
  3147.  
  3148. static CAnimatedCursor *sAnimatedCursor;
  3149.  
  3150. CAnimatedCursor::CAnimatedCursor() {
  3151.  
  3152.    mTaskUPP = NewTimerProc( DoAnimation );
  3153.  
  3154. } // end CAnimatedCursor
  3155.  
  3156. void
  3157. CAnimatedCursor::BeginAnimation() {
  3158.    
  3159.    sAnimatedCursor = new CAnimatedCursor();
  3160.       
  3161.    (*sAnimatedCursor).mTask.tmAddr = (*sAnimatedCursor).mTaskUPP; // Get address
  3162.    (*sAnimatedCursor).mTask.tmWakeUp = 0; // Initialize tmWakeUp
  3163.    (*sAnimatedCursor).mTask.tmReserved = 0; // Initialize tmReserved
  3164.    ::InsXTime( (QElemPtr)&(*sAnimatedCursor).mTask ); // Install the task record
  3165.    ::PrimeTime( (QElemPtr)&(*sAnimatedCursor).mTask, kCursorAnimationDelay ); 
  3166.  
  3167. } // CAnimatedCursor::BeginAnimation
  3168.  
  3169. pascal void DoAnimation( void ) {
  3170.  
  3171.    SysBeep( 1 );
  3172.  
  3173. } // CAnimatedCursor::DoAnimation
  3174.  
  3175. - ------------------------------------------------------------
  3176. Matt Gieselman  
  3177. Software Engineer and Juggler                      
  3178. The Color Partnership
  3179. matt@colorpar.com
  3180. www.colorpar.com
  3181. - -----------------------------------------------------------
  3182.  
  3183. +++++++++++++++++++++++++++
  3184.  
  3185. >From SouthSide@kagi.com (Bob Bradley)
  3186. Date: Tue, 29 Oct 1996 00:04:11 -0800
  3187. Organization: SPC
  3188.  
  3189. In article <matt-2810961459080001@204.253.173.28>, matt@colorpar.com (Matt
  3190. Gieselman) wrote:
  3191.  
  3192. > I have the following code for doing animated cursors.  The idea is that
  3193. > DoAnimation gets called every so often by the time manager.  Well it all
  3194. > looks ok to me but nothing ever happens, do Animation never gets called.
  3195. > If anyone has any ideas or has used the time manager successfully any
  3196. > help would be appreciated.  Please email any idea's.
  3197.  
  3198. > pascal void DoAnimation( void ) {
  3199. >    SysBeep( 1 );
  3200. > } // CAnimatedCursor::DoAnimation
  3201.  
  3202. You can't call SysBeep from a Time Manager task. Time Manager tasks get
  3203. called at interrupt time and SysBeep (as well as most other ToolBox calls)
  3204. isn't safe to call then.
  3205.  
  3206. What you can do is set a flag from the Time Manager task (and re-prime it
  3207. as well or it won't get called again) and in your event loop, check for
  3208. that flag, increment your animation and set the flag to false (which will
  3209. get set to true again at the next firing of the Time Manager task).
  3210.  
  3211. +++++++++++++++++++++++++++
  3212.  
  3213. >From doverton@iglou.com (Dave Overton)
  3214. Date: Fri, 1 Nov 1996 13:09:55 GMT
  3215. Organization: IgLou Internet Services (1-800-436-4456)
  3216.  
  3217. Ah Matt, Matt, Matt,
  3218. Hey bud how you doing?
  3219. If you want a real sample of time mgr code, I will send you one bud. Check
  3220. your e-mail tomorrow.
  3221. DaveO
  3222.  
  3223.  
  3224.  
  3225. In article <matt-2810961459080001@204.253.173.28>, matt@colorpar.com (Matt
  3226. Gieselman) wrote:
  3227.  
  3228. > Hey,
  3229. > I have the following code for doing animated cursors.  The idea is that
  3230. > DoAnimation gets called every so often by the time manager.  Well it all
  3231. > looks ok to me but nothing ever happens, do Animation never gets called.
  3232. > If anyone has any ideas or has used the time manager successfully any
  3233. > help would be appreciated.  Please email any idea's.
  3234. > Thanks,
  3235. > Matt
  3236. > =-=-=-=-=-=-=-=-=-=-=-=
  3237. > pascal void DoAnimation( void );
  3238. > static CAnimatedCursor *sAnimatedCursor;
  3239. > CAnimatedCursor::CAnimatedCursor() {
  3240. >    mTaskUPP = NewTimerProc( DoAnimation );
  3241. > } // end CAnimatedCursor
  3242. > void
  3243. > CAnimatedCursor::BeginAnimation() {
  3244. >    
  3245. >    sAnimatedCursor = new CAnimatedCursor();
  3246. >       
  3247. >    (*sAnimatedCursor).mTask.tmAddr = (*sAnimatedCursor).mTaskUPP; // Get
  3248. address
  3249. >    (*sAnimatedCursor).mTask.tmWakeUp = 0; // Initialize tmWakeUp
  3250. >    (*sAnimatedCursor).mTask.tmReserved = 0; // Initialize tmReserved
  3251. >    ::InsXTime( (QElemPtr)&(*sAnimatedCursor).mTask ); // Install the
  3252. task record
  3253. >    ::PrimeTime( (QElemPtr)&(*sAnimatedCursor).mTask, kCursorAnimationDelay ); 
  3254. > } // CAnimatedCursor::BeginAnimation
  3255. > pascal void DoAnimation( void ) {
  3256. >    SysBeep( 1 );
  3257. > } // CAnimatedCursor::DoAnimation
  3258. > --------------------------------------------------------------
  3259. > Matt Gieselman  
  3260. > Software Engineer and Juggler                      
  3261. > The Color Partnership
  3262. > matt@colorpar.com
  3263. > www.colorpar.com
  3264. > -------------------------------------------------------------
  3265.  
  3266. +++++++++++++++++++++++++++
  3267.  
  3268. >From SouthSide@kagi.com (Bob Bradley)
  3269. Date: Sat, 02 Nov 1996 13:49:46 -0800
  3270. Organization: SPC
  3271.  
  3272. In article <naset-ya023080000211961511400001@news.compuserve.com>,
  3273. naset@phys.ufl.edu (Jeff Naset) wrote:
  3274.  
  3275. > If you are animating the cursor during some period when your application is
  3276. > busy (and out of your event loop for more than 1/15 of sec of so), you will
  3277. > probably want to update the cursor directly from the Time Mgr. task.
  3278.  
  3279. I would stay away from spinning a cursor from a automatically priming Time
  3280. Manager task.
  3281.  
  3282. The whole point of spinning the cursor is to let the user know the
  3283. computer is doing something and that it hasn't crashed. If you spin the
  3284. cursor from a Time Manager task, there's a great chance that even if your
  3285. application has crashed and is not doing anything useful, it will still
  3286. spin the cursor thereby tricking your user into thinking it hasn't
  3287. crashed.
  3288.  
  3289. Set a flag from the Time Manager task and spin the cursor from your event
  3290. loop if necessary. If your event loop is not getting call often enough to
  3291. spin the cursor, you are doing way too much between calls to WaitNextEvent
  3292. anyway and should re-think your algorithm.
  3293.  
  3294. +++++++++++++++++++++++++++
  3295.  
  3296. >From naset@phys.ufl.edu (Jeff Naset)
  3297. Date: Sat, 02 Nov 1996 15:11:40 -0400
  3298. Organization: CompuServe Incorporated
  3299.  
  3300. In article <SouthSide-2910960004110001@bns.vip.best.com>,
  3301. SouthSide@kagi.com (Bob Bradley) wrote:
  3302.  
  3303. > In article <matt-2810961459080001@204.253.173.28>, matt@colorpar.com (Matt
  3304. > Gieselman) wrote:
  3305. > > I have the following code for doing animated cursors.  The idea is that
  3306. > > DoAnimation gets called every so often by the time manager.  Well it all
  3307. > > looks ok to me but nothing ever happens, do Animation never gets called.
  3308. > > If anyone has any ideas or has used the time manager successfully any
  3309. > > help would be appreciated.  Please email any idea's.
  3310. > > 
  3311. > > pascal void DoAnimation( void ) {
  3312. > > 
  3313. > >    SysBeep( 1 );
  3314. > > 
  3315. > > } // CAnimatedCursor::DoAnimation
  3316. > You can't call SysBeep from a Time Manager task. Time Manager tasks get
  3317. > called at interrupt time and SysBeep (as well as most other ToolBox calls)
  3318. > isn't safe to call then.
  3319. > What you can do is set a flag from the Time Manager task (and re-prime it
  3320. > as well or it won't get called again) and in your event loop, check for
  3321. > that flag, increment your animation and set the flag to false (which will
  3322. > get set to true again at the next firing of the Time Manager task).
  3323.  
  3324. If you are animating the cursor during some period when your application is
  3325. busy (and out of your event loop for more than 1/15 of sec of so), you will
  3326. probably want to update the cursor directly from the Time Mgr. task.
  3327.  
  3328. Although you cannot call SysBeep(...), you can call SetCursor(...),
  3329. provided that the cursors have been loaded into a buffer ahead of time. 
  3330. You cannot do this using members of your class CAnimatedCursor, because the
  3331. instance pointer (usu. A4) will not be set correctly and attempting to call
  3332. member functions or access member data will crash (technically,
  3333. CAnimatedCursor::DoAnimation should be a static function if you are using
  3334. it like this.)  Just have CAnimatedCursor have some type of activate
  3335. function that stores the cursors in a global array, and have DoAnimation
  3336. select the appropriate one and SetCursor(...) it.  Also remember to set up
  3337. your app's A5 world from the time manager task.
  3338.  
  3339. +++++++++++++++++++++++++++
  3340.  
  3341. >From matt@colorpar.com (Matt Gieselman)
  3342. Date: Mon, 04 Nov 1996 10:50:46 -0800
  3343. Organization: The Color Partnership
  3344.  
  3345. In article <SouthSide-0211961349470001@bns.vip.best.com>,
  3346. SouthSide@kagi.com (Bob Bradley) wrote:
  3347.  
  3348. > I would stay away from spinning a cursor from a automatically priming Time
  3349. > Manager task.
  3350. > The whole point of spinning the cursor is to let the user know the
  3351. > computer is doing something and that it hasn't crashed. If you spin the
  3352. > cursor from a Time Manager task, there's a great chance that even if your
  3353. > application has crashed and is not doing anything useful, it will still
  3354. > spin the cursor thereby tricking your user into thinking it hasn't
  3355. > crashed.
  3356. > Set a flag from the Time Manager task and spin the cursor from your event
  3357. > loop if necessary. If your event loop is not getting call often enough to
  3358. > spin the cursor, you are doing way too much between calls to WaitNextEvent
  3359. > anyway and should re-think your algorithm.
  3360.  
  3361. I kind of have to do it this way.  I am using PowerPlant and when
  3362. a windows constructor gets called it calls all of the contstructors
  3363. for the objects it contains.  This particular window has a lot of
  3364. controls that allocate GWorlds so it takes about 3-4 seconds before
  3365. I get control back again.  I could put code to animate the cursor 
  3366. in every objects constructor but that wouldn't be very elegeant.  
  3367.  
  3368. This way the user gets feedback that something is going on instead
  3369. of a 4 second pause.  The only problem as you mentioned was the
  3370. computer could crash and the animation keep going, well I will just
  3371. wait for Apple to adopt BeOS and maybe I wont have this problem ;>).
  3372.  
  3373. Thanks for all the replies.
  3374.  
  3375. Matt
  3376.  
  3377. - ------------------------------------------------------------
  3378. Matt Gieselman  
  3379. Software Engineer and Juggler                      
  3380. The Color Partnership
  3381. matt@colorpar.com
  3382. www.colorpar.com
  3383. - -----------------------------------------------------------
  3384.  
  3385. +++++++++++++++++++++++++++
  3386.  
  3387. >From "Aidan Cully" <aidan@xanadu.kublai.com>
  3388. Date: 5 Nov 96 14:57:23 -0400
  3389. Organization: INTAC Access Corporation - An Internet Service Provider
  3390.  
  3391. >I kind of have to do it this way.  I am using PowerPlant and when
  3392. >a windows constructor gets called it calls all of the contstructors
  3393. >for the objects it contains.  This particular window has a lot of
  3394. >controls that allocate GWorlds so it takes about 3-4 seconds before
  3395. >I get control back again.  I could put code to animate the cursor 
  3396. >in every objects constructor but that wouldn't be very elegeant.  
  3397. >
  3398. >This way the user gets feedback that something is going on instead
  3399. >of a 4 second pause.  The only problem as you mentioned was the
  3400. >computer could crash and the animation keep going, well I will just
  3401. >wait for Apple to adopt BeOS and maybe I wont have this problem ;>).
  3402. >
  3403. >Thanks for all the replies.
  3404.  
  3405. You could have all of your classes derive from a dummy class which
  3406. overloads the constructors, and spin the cursor from there..
  3407.  
  3408. You could make an animated cursor class, give it an AdvanceFrame() function
  3409. or whatnot, and look at the PowerPlant code, sticking in the AdvanceFrame()
  3410. wherever necessary (probably in the LPane constructor).  Have a static
  3411. variable which will be the clock icon, or something.
  3412.  
  3413. There are a few ways you could get around it, these are just the first two
  3414. to come to mind.  I would probably do the 2nd myself..
  3415.  
  3416. >Matt
  3417. >
  3418. >--------------------------------------------------------------
  3419. >Matt Gieselman  
  3420. >Software Engineer and Juggler                      
  3421. >The Color Partnership
  3422. >matt@colorpar.com
  3423. >www.colorpar.com
  3424. >-------------------------------------------------------------
  3425.  
  3426. --aidan
  3427.  
  3428.  
  3429.  
  3430.  
  3431. +++++++++++++++++++++++++++
  3432.  
  3433. >From plsuh@gslink.com (Paul L. Suh)
  3434. Date: Thu, 07 Nov 1996 10:25:38 -0500
  3435. Organization: UPenn Grad Econ
  3436.  
  3437. In article <matt-0411961050460001@204.253.173.28>, matt@colorpar.com (Matt
  3438. Gieselman) wrote:
  3439.  
  3440. >In article <SouthSide-0211961349470001@bns.vip.best.com>,
  3441. >SouthSide@kagi.com (Bob Bradley) wrote:
  3442. >
  3443. >> I would stay away from spinning a cursor from a automatically priming Time
  3444. >> Manager task.
  3445.  
  3446. [snip]
  3447.  
  3448. >> Set a flag from the Time Manager task and spin the cursor from your event
  3449. >> loop if necessary. If your event loop is not getting call often enough to
  3450. >> spin the cursor, you are doing way too much between calls to WaitNextEvent
  3451. >> anyway and should re-think your algorithm.
  3452. >
  3453. >I kind of have to do it this way.  I am using PowerPlant and when
  3454. >a windows constructor gets called it calls all of the contstructors
  3455. >for the objects it contains.  This particular window has a lot of
  3456. >controls that allocate GWorlds so it takes about 3-4 seconds before
  3457. >I get control back again.  I could put code to animate the cursor 
  3458. >in every objects constructor but that wouldn't be very elegeant.  
  3459.  
  3460. Well, if you're using PowerPlant, how about using multiple inheritance and
  3461. having each object inherit a 'spin cursor' method from somewhere?  Just a
  3462. thought.  
  3463.  
  3464.  
  3465. --Paul
  3466.  
  3467. ---------------------------
  3468.  
  3469. >From ajmas@worldnet.fr (Andre-John Mas)
  3470. Subject: Using a ditl as a template
  3471. Date: Fri, 1 Nov 1996 13:04:24 +0100
  3472. Organization: SCT / Worldnet - Internet Provider & Information Exchange - Paris, France
  3473.  
  3474. I am wanting to create a dialog that several modes of display. Rather
  3475. than having to change dialog, as this is IMHO an ugly solution I would
  3476. rather be able to use several templates and change the contents as
  3477. necessary. I feel that by using several ditls I could set up the
  3478. positions of the dialog items for the several modes of display and then
  3479. copy and delete the dialog items as necessary.  The only problem is how
  3480. would I go about dynamically finding out the dialog item in a ditl and
  3481. displaying them in my dialog.
  3482.  
  3483. Small note, the dialog items would only appear in one part of the
  3484. dialog. The other part already having a certain layout.  I believe the
  3485. old system 6 control panel window must have done something snazzy to be
  3486. able to do such a thing.
  3487.  
  3488. One last thing, does anyone have a document or something that tells me
  3489. how the items in a dialog box should be spaced and is there a program
  3490. that would allow me to align dialog items more precisley than ResEdit,
  3491. if this solution is free and means programming, then that is not a
  3492. problem.
  3493.  
  3494. If you have pointers to source code, examples and other stuff I would
  3495. very much appreciate it.
  3496.  
  3497. Thanks
  3498.  
  3499. Andre-John
  3500.  
  3501. --
  3502. >------------------------------  ,,,, --------------------------------<
  3503.           Andre-John MAS         - -     Smail: 821, Chemin du Riou   
  3504.    Email : ajmas@worldnet.fr      L        06140 Vence, France      
  3505. >------------------------------   -   --------------------------------<
  3506.  Tel/Fax  : (00)(33)0493.24.64.90     http://myweb.worldnet.fr/~ajmas/
  3507.  
  3508. +++++++++++++++++++++++++++
  3509.  
  3510. >From gga@it.ntu.edu.au (Giles Alexander)
  3511. Date: 3 Nov 1996 00:16:09 GMT
  3512. Organization: Northern Territory University
  3513.  
  3514. Andre-John Mas (ajmas@worldnet.fr) wrote:
  3515. : I am wanting to create a dialog that several modes of display. Rather
  3516. : than having to change dialog, as this is IMHO an ugly solution I would
  3517. : rather be able to use several templates and change the contents as
  3518. : necessary. I feel that by using several ditls I could set up the
  3519. : positions of the dialog items for the several modes of display and then
  3520. : copy and delete the dialog items as necessary.  The only problem is how
  3521. : would I go about dynamically finding out the dialog item in a ditl and
  3522. : displaying them in my dialog.
  3523.  
  3524. It sounds liek you want to create a multipane dialog, like CodeWarrior's 
  3525. prefs or the new Colour Picker.  The simple answer is read _d e v e l o 
  3526. p_ issue 23.  There is an article on creating Multipane dialogs in there.
  3527.  
  3528. Regards,
  3529. Giles Alexander
  3530.  
  3531. --
  3532. giles@kagi.com                          | If builders built buildings the way
  3533.                                         | programmers write programs, the
  3534. Check out Note:                         | first woodpecker that comes along
  3535. http://www.ozemail.com.au/~notesoft/    | would destroy all of civilisation.
  3536.  
  3537. +++++++++++++++++++++++++++
  3538.  
  3539. >From mouser@zercom.net (Martin-Gilles Lavoie)
  3540. Date: 5 Nov 1996 13:52:05 GMT
  3541. Organization: Groupimage, inc.
  3542.  
  3543. In article <1996110113042454817@nice0-140.sct.fr>, ajmas@worldnet.fr
  3544. (Andre-John Mas) wrote:
  3545.  
  3546. [...]
  3547. > copy and delete the dialog items as necessary.  The only problem is how
  3548. > would I go about dynamically finding out the dialog item in a ditl and
  3549. > displaying them in my dialog.
  3550. > Small note, the dialog items would only appear in one part of the
  3551. > dialog. The other part already having a certain layout.  I believe the
  3552. > old system 6 control panel window must have done something snazzy to be
  3553. > able to do such a thing.
  3554. [...]
  3555.  
  3556. Check out 'ShotenDITL' and 'AppendDITL'.
  3557.  
  3558. -- 
  3559. Martin-Gilles Lavoie  |  Opinions expressed herein are just that.
  3560. mouser@zercom.net     |  "No! Do, or do not.  There is no try."
  3561. Globimage, inc.       |         --Yoda on error handling
  3562.  
  3563. +++++++++++++++++++++++++++
  3564.  
  3565. >From ajmas@worldnet.fr (Andre-John Mas)
  3566. Date: Fri, 8 Nov 1996 12:06:20 +0100
  3567. Organization: SCT / Worldnet - Internet Provider & Information Exchange - Paris, France
  3568.  
  3569. Giles Alexander <gga@it.ntu.edu.au> wrote:
  3570. >
  3571. > It sounds liek you want to create a multipane dialog, like CodeWarrior's
  3572. > prefs or the new Colour Picker.  The simple answer is read _d e v e l o
  3573. > p_ issue 23.  There is an article on creating Multipane dialogs in there.
  3574.  
  3575. Yep, after checking out the Developer's site at Apple, I picked this up.
  3576. It does exactly what I want to do. Only thing now is to adapt it to
  3577. Pascal :)
  3578.  
  3579. Andre-John
  3580.  
  3581. --
  3582. >------------------------------  ,,,, --------------------------------<
  3583.           Andre-John MAS         - -     Smail: 821, Chemin du Riou   
  3584.    Email : ajmas@worldnet.fr      L        06140 Vence, France      
  3585. >------------------------------   -   --------------------------------<
  3586.  Tel/Fax  : (00)(33)0493.24.64.90     http://myweb.worldnet.fr/~ajmas/
  3587.  
  3588. ---------------------------
  3589.  
  3590. >From cbrunet@geocities.com (Charles Brunet)
  3591. Subject: What is the reference of the book of Motorola on the 68000 family?
  3592. Date: Mon, 11 Nov 1996 18:42:31 -0500
  3593. Organization: Universite Laval
  3594.  
  3595. I'd like to have the reference of the Motorola's book on the 68000
  3596. family (to program in asembler) Is it free? What is the name (or the
  3597. number) of this book? Thanks,
  3598.  
  3599. -- 
  3600. NAME  : Charles Brunet      (I live in Canada, I speak French)
  3601. EMAIL : <cbrunet@geocities.com>
  3602. WEB   : <http://www.geocities.com/SiliconValley/1029/>
  3603.  
  3604. +++++++++++++++++++++++++++
  3605.  
  3606. >From BHuey@worldnet.att.net (Hugh Johnson)
  3607. Date: Tue, 12 Nov 1996 09:08:24 -0500
  3608. Organization: AT&T WorldNet Services
  3609.  
  3610. In article <19961111184231110446@ppp-b12.ulaval.ca>, cbrunet@geocities.com
  3611. (Charles Brunet) wrote:
  3612.  
  3613. > I'd like to have the reference of the Motorola's book on the 68000
  3614. > family (to program in asembler) Is it free? What is the name (or the
  3615. > number) of this book? Thanks,
  3616.  
  3617. I don't think there's one reference that covers the whole family, but here
  3618. are a couple of books I found at a used book store:
  3619.  
  3620. M68000 Programer's Reference Manual - ISBN 0-13-566795-X
  3621.  
  3622. MC68020 User's Manual  - ISBN 0-13-566878-6
  3623.  
  3624. Both are published by Prentice-Hall
  3625.  
  3626. -- 
  3627. The universe is a figment of it's own imagination.
  3628.  
  3629. +++++++++++++++++++++++++++
  3630.  
  3631. >From ejr@netcom.com (Erik J. Rogers)
  3632. Date: Tue, 12 Nov 1996 23:43:05 GMT
  3633. Organization: NETCOM On-line Communication Services (408 261-4700 guest)
  3634.  
  3635. Charles Brunet (cbrunet@geocities.com) wrote:
  3636. : I'd like to have the reference of the Motorola's book on the 68000
  3637. : family (to program in asembler) Is it free? What is the name (or the
  3638. : number) of this book? Thanks,
  3639.  
  3640. There is the "M68000 FAMILY REFERENCE" from Motorola, which covers
  3641. basically everything from opcodes to electronic characteristics to
  3642. mechanical characteristics.  There is also a "USER'S MANUAL" for each sub
  3643. family (MC68000, MC68008, MC68010, MC60HC000 for example under the M68000
  3644. "subfamily").  I picked up my copies for free a few years ago from a
  3645. Mororola office.  There is a literature ordering web page nowadays, though
  3646. I can't guarantee that these particulars are available. 
  3647.  
  3648.   This is a technical reference only, not a tutorial or anything specific
  3649. to actual development system use, but it has as all the microprocessor
  3650. details.  
  3651.  The 68000 only user's manual (eighth edition) is ISBN 0-13-541665-5; 
  3652. Prentice Hall.  The Family Reference indicates only "M68000FR/AD" via
  3653. Motorola Literature Distribution Centers:  USA:  Motorola Literature
  3654. Distribution; P.O. Box 20912; Phoenix, Arizona 85036.  I would check the 
  3655. web page though...
  3656.  
  3657. Erik J. Rogers
  3658.  
  3659. ---------------------------
  3660.  
  3661. >From cfoster@pobox.com (Colin Foster)
  3662. Subject: [Q] AEInstallEventHandler breaks under PPC
  3663. Date: Sun, 10 Nov 1996 03:16:41 -0500
  3664. Organization: The Electric Bean
  3665.  
  3666.  
  3667. Hi,
  3668.  
  3669. Below is the abridged version of my AEInstallHandler routine which, works
  3670. great as a CodeWarrior 68k project, but as a PPC project it breaks.
  3671.  
  3672. When AEProcessAppleEvent is called, the program either just quits (no
  3673. error given) or jumps to the DoQuitApp function, even if that wasn't the
  3674. AppleEvent sent.  
  3675.  
  3676. Any advice would be hugely appreciated!
  3677. -Colin.
  3678.  
  3679.  
  3680. void  AEInstallHandlers( void )
  3681. {
  3682. OSErr               err;
  3683. AEEventHandlerUPP   DoOpenAppUPP, DoQuitAppUPP;
  3684.    
  3685. DoOpenAppUPP = NewAEEventHandlerProc( DoOpenApp );
  3686. err = AEInstallEventHandler( kCoreEventClass, kAEOpenApplication,
  3687.                              DoOpenAppUPP, 0L, false );
  3688. DisposeRoutineDescriptor( DoOpenAppUPP );
  3689.  
  3690.    
  3691. DoQuitAppUPP = NewAEEventHandlerProc( DoQuitApp );
  3692. err = AEInstallEventHandler( kCoreEventClass, kAEQuitApplication,
  3693.                              DoQuitAppUPP, 0L, false );
  3694. DisposeRoutineDescriptor( DoQuitAppUPP );
  3695. }
  3696.  
  3697. +++++++++++++++++++++++++++
  3698.  
  3699. >From lnicolle@rsvs.ulaval.ca (Ludovic Nicolle)
  3700. Date: 10 Nov 1996 19:40:52 GMT
  3701. Organization: Universite Laval
  3702.  
  3703. In article <cfoster-1011960316410001@news.interlog.com>, cfoster@pobox.com
  3704. (Colin Foster) wrote:
  3705.  
  3706. > void  AEInstallHandlers( void )
  3707. > {
  3708. > OSErr               err;
  3709. > AEEventHandlerUPP   DoOpenAppUPP, DoQuitAppUPP;
  3710. >    
  3711. > DoOpenAppUPP = NewAEEventHandlerProc( DoOpenApp );
  3712. > err = AEInstallEventHandler( kCoreEventClass, kAEOpenApplication,
  3713. >                              DoOpenAppUPP, 0L, false );
  3714. > DisposeRoutineDescriptor( DoOpenAppUPP );
  3715. >    
  3716. > DoQuitAppUPP = NewAEEventHandlerProc( DoQuitApp );
  3717. > err = AEInstallEventHandler( kCoreEventClass, kAEQuitApplication,
  3718. >                              DoQuitAppUPP, 0L, false );
  3719. > DisposeRoutineDescriptor( DoQuitAppUPP );
  3720. > }
  3721.  
  3722. I *think* your problems come with your disposing of the UPPs. Please
  3723. consider trying the following, even if I don't give you any warranty. ;-)
  3724.  
  3725. UPPs are pointer to structures (RoutineDescriptor) which must stay
  3726. allocated as long as they are susceptible to be used for calling the
  3727. underlying function. When UPPs are used locally (for ModalDialog
  3728. filterprocs for example), they can be trashed just after their use. But as
  3729. you understand, when a UPP is built for use in the future, you should NOT
  3730. deallocates its memory as it will give a dangling pointer in the System
  3731. Apple Event Dispatch table (which keeps only the pointer to the routine
  3732. descriptor you gave to it).
  3733.  
  3734. In this case, with open app, quit app, and all other registered Apple
  3735. event handlers you can have with the system, you must let their routine
  3736. descriptors in memory and you should remove your two dispose calls (I
  3737. think).
  3738.  
  3739. Some people will maybe argue than the open app UPP can be safely trashed
  3740. after it has been called once at the beginning of your app, but I would
  3741. not do this myself, as you don't know if a script or some buggy app will
  3742. send you a second one by mistake. Just let it in memory, it is not so big.
  3743.  
  3744.  
  3745. Ludo "yÈ, a UPP question from someone who knows UPP exist... ;-) "
  3746.  
  3747. +++++++++++++++++++++++++++
  3748.  
  3749. >From Lev_Knopov@mail.stil.scitex.com (Lev Knopov)
  3750. Date: Sun, 10 Nov 1996 12:15:34 +0200
  3751. Organization: Scitex Corporation Ltd.
  3752.  
  3753. In article <cfoster-1011960316410001@news.interlog.com>, cfoster@pobox.com
  3754. (Colin Foster) wrote:
  3755.  
  3756. > Hi,
  3757. > Below is the abridged version of my AEInstallHandler routine which, works
  3758. > great as a CodeWarrior 68k project, but as a PPC project it breaks.
  3759. > When AEProcessAppleEvent is called, the program either just quits (no
  3760. > error given) or jumps to the DoQuitApp function, even if that wasn't the
  3761. > AppleEvent sent.  
  3762. > Any advice would be hugely appreciated!
  3763. > -Colin.
  3764. > void  AEInstallHandlers( void )
  3765. > {
  3766. > OSErr               err;
  3767. > AEEventHandlerUPP   DoOpenAppUPP, DoQuitAppUPP;
  3768. >    
  3769. > DoOpenAppUPP = NewAEEventHandlerProc( DoOpenApp );
  3770. > err = AEInstallEventHandler( kCoreEventClass, kAEOpenApplication,
  3771. >                              DoOpenAppUPP, 0L, false );
  3772. > DisposeRoutineDescriptor( DoOpenAppUPP );
  3773. >    
  3774. > DoQuitAppUPP = NewAEEventHandlerProc( DoQuitApp );
  3775. > err = AEInstallEventHandler( kCoreEventClass, kAEQuitApplication,
  3776. >                              DoQuitAppUPP, 0L, false );
  3777. > DisposeRoutineDescriptor( DoQuitAppUPP );
  3778. > }
  3779.  
  3780. Colin, you destroy your routine descriptor in DisposeRoutineDescriptor call.
  3781. But address of decriptor is in the AE tables and so OS calls your
  3782. descriptor and hangs. You must call to DisposeRoutineDescriptor only after
  3783. AERemoveEventHandler().
  3784.  
  3785. HTH
  3786.  
  3787. -- 
  3788.   //\\   Lev Knopov
  3789.   \\//   Scitex Israel
  3790. ///  \\\ Lev_Knopov@mail.stil.scitex.com
  3791.  
  3792. +++++++++++++++++++++++++++
  3793.  
  3794. >From jeremyr@dcs.qmw.ac.uk (Jeremy Roussak)
  3795. Date: 12 Nov 1996 22:03:59 GMT
  3796. Organization: Queen Mary & Westfield College, London, England
  3797.  
  3798. In article <cfoster-1011960316410001@news.interlog.com>
  3799. cfoster@pobox.com (Colin Foster) writes:
  3800.  
  3801. > Below is the abridged version of my AEInstallHandler routine which, works
  3802. > great as a CodeWarrior 68k project, but as a PPC project it breaks.
  3803. > void  AEInstallHandlers( void )
  3804. > {
  3805. > OSErr               err;
  3806. > AEEventHandlerUPP   DoOpenAppUPP, DoQuitAppUPP;
  3807. >    
  3808. > DoOpenAppUPP = NewAEEventHandlerProc( DoOpenApp );
  3809. > err = AEInstallEventHandler( kCoreEventClass, kAEOpenApplication,
  3810. >                              DoOpenAppUPP, 0L, false );
  3811. > DisposeRoutineDescriptor( DoOpenAppUPP );
  3812. It's not a good idea to dispose of a routine descriptor that is in use!
  3813. You need to keep it around until you quit or deinstall that handler.
  3814.  
  3815. Jeremy
  3816.  
  3817. ---------------------------
  3818.  
  3819. >From amcclain@il-icom.net (Andrew McClain)
  3820. Subject: [Q] Displaying only folders in a Standard Get File
  3821. Date: Sat, 09 Nov 1996 16:19:51 -0500
  3822. Organization: Illinois Internet Communications, Inc.
  3823.  
  3824. How do I show only folders in a Standard Get File dialog? I know this is
  3825. documented in IM:Files, but it's in Pascal and it seems quite confusing to
  3826. me. Could someone translate it or give me a better alternative?
  3827.  
  3828. Thanks in advance.
  3829. Andrew McClain
  3830.  
  3831. -- 
  3832. Andrew McClain
  3833.  
  3834. +++++++++++++++++++++++++++
  3835.  
  3836. >From blob@ricochet.net
  3837. Date: Sun, 10 Nov 1996 12:06:32 -0800
  3838. Organization: (none)
  3839.  
  3840. In article <amcclain-0911961619520001@206.62.101.63>, amcclain@il-icom.net
  3841. (Andrew McClain) wrote:
  3842.  
  3843. > How do I show only folders in a Standard Get File dialog? I know this is
  3844. > documented in IM:Files, but it's in Pascal and it seems quite confusing to
  3845. > me. Could someone translate it or give me a better alternative?
  3846.  
  3847. MoreStandardFile at <ftp://members.aol.com/jumplong/> has a routine to do
  3848. this.  There are several in the sample code at <http://devworld.apple.com>
  3849. as well.
  3850.  
  3851. -- 
  3852. (Pointers to other Mac programming web sites at
  3853. <http://devworld.apple.com/dev/geeks.html>)
  3854.  
  3855. +++++++++++++++++++++++++++
  3856.  
  3857. >From David Gillies <daggilli@vader.brad.ac.uk>
  3858. Date: Mon, 11 Nov 1996 15:35:15 +0000
  3859. Organization: University of Bradford
  3860.  
  3861. blob@ricochet.net wrote:
  3862. > In article <amcclain-0911961619520001@206.62.101.63>, amcclain@il-icom.net
  3863. > (Andrew McClain) wrote:
  3864. > > How do I show only folders in a Standard Get File dialog? I know this is
  3865. > > documented in IM:Files, but it's in Pascal and it seems quite confusing to
  3866. > > me. Could someone translate it or give me a better alternative?
  3867. > MoreStandardFile at <ftp://members.aol.com/jumplong/> has a routine to do
  3868. > this.  There are several in the sample code at <http://devworld.apple.com>
  3869. > as well.
  3870. > --
  3871. > (Pointers to other Mac programming web sites at
  3872. > <http://devworld.apple.com/dev/geeks.html>)
  3873.  
  3874. No need to get the whole of MoreFiles - it's really quite simple.
  3875. You simply need to provide a ProcPtr to a FileFilter function (don't
  3876. forget the UPP Mixed Mode stuff if you're going to compile for PPC 
  3877. and 68K).
  3878.  
  3879. You just want a function that returns a Boolean for each file it is
  3880. given. The prototype for the function is just
  3881. pascal Boolean Filter(CInfoPBRec *infoRec)
  3882.  
  3883. Put in NULL for the typeList parameter and -1 for numTypes.
  3884.  
  3885. Look at infoRec->ioFlAtrb. If bit 4 is set it's a directory. You also
  3886. need to look at the fdFlags and fdType fields of the embedded FInfo 
  3887. struct (can't remember the name offhand) and if bit 15 (isAlias) is
  3888. set in fdFlags, then check the fdType to see if it's one of the
  3889. reserved types for aliases to folders.
  3890.  
  3891. Remember filter functions return FALSE if the file is NOT to be
  3892. suppressed i.e. TRUE means 'do not display this file'.
  3893.  
  3894. Your filter function will be called every time the list needs
  3895. rebuilding - essentially every time StandardFile's dialog filter
  3896. gets a message of type sfHookRebuildList. 
  3897. -- 
  3898. ______________________________________________________________________
  3899. David A. G. Gillies                        (daggilli@vader.brad.ac.uk)
  3900.       University of Bradford, Bradford, West Yorkshire, England
  3901. _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  3902.  
  3903. +++++++++++++++++++++++++++
  3904.  
  3905. >From janee@world.std.com (Jane Eisenstein)
  3906. Date: Mon, 11 Nov 1996 17:46:27 GMT
  3907. Organization: The World @ Software Tool & Die
  3908.  
  3909. In article <328747B3.24D7@vader.brad.ac.uk>, David Gillies
  3910. <daggilli@vader.brad.ac.uk> wrote:
  3911.  
  3912. > You simply need to provide a ProcPtr to a FileFilter function (don't
  3913. > forget the UPP Mixed Mode stuff if you're going to compile for PPC 
  3914. > and 68K).
  3915.  
  3916. What is "UPP Mixed Mode stuff"?
  3917.  
  3918. -- 
  3919. Jane Eisenstein    janee@world.std.com    http://world.std.com/~janee/
  3920.  
  3921. +++++++++++++++++++++++++++
  3922.  
  3923. >From David Gillies <daggilli@vader.brad.ac.uk>
  3924. Date: Mon, 11 Nov 1996 21:38:58 +0000
  3925. Organization: University of Bradford
  3926.  
  3927. Jane Eisenstein wrote:
  3928. > In article <328747B3.24D7@vader.brad.ac.uk>, David Gillies
  3929. > <daggilli@vader.brad.ac.uk> wrote:
  3930. > > You simply need to provide a ProcPtr to a FileFilter function (don't
  3931. > > forget the UPP Mixed Mode stuff if you're going to compile for PPC
  3932. > > and 68K).
  3933. > >
  3934. > What is "UPP Mixed Mode stuff"?
  3935. > --
  3936. > Jane Eisenstein    janee@world.std.com    http://world.std.com/~janee/
  3937.  
  3938. The PowerPC and 68K Macs have very different runtime architectures. Most
  3939. of the time the transition between the two is seamless, but occasionally
  3940. you need to take account of it. One of these times is when you have an
  3941. embedded callback procedure, like in ModalDialog, for example, viz.:
  3942.  
  3943. ModalDialog(DialogBoxFilterFunction,&itemHit);
  3944.  
  3945. This was fine in the good ol' 68K days, but to make your life easier
  3946. when you come to port your code to PPC, the new Universal Headers
  3947. have defined a boatload of routines to handle switching between 68K
  3948. and PPC code.
  3949.  
  3950. The problem arises when you consider the difference in C and Pascal
  3951. calling conventions. If 68K code is being called from PPC or vice
  3952. versa then the Mixed Mode Manager needs to know the calling conventions
  3953. of the function so it can push and pop the arguments on and off the
  3954. stack in the right fashion.
  3955.  
  3956. 68K code can just pass in a ProcPtr, which is just a memory address,
  3957. but PPC code requires a much more sophisticated structure. To make
  3958. life easier, those nice folks at Apple have invented a thing called
  3959. a UniversalProcPtr (UPP). When you're compiling 68K, it looks like
  3960. a ProcPtr; when you're doing PPC compilation it looks like a
  3961. RoutineDescriptor. You pays yer money and yer takes yer choice.
  3962. Instead of just passing in a ProcPtr, you call a routine along
  3963. the lines of NewUniversalProcPtr(myCallbackProcedure) which will
  3964. fill in the required fields for you if in PPC mode.
  3965.  
  3966. Each particular callback has its own API call to allocate the right
  3967. fields. Look in any of the headers for things like
  3968. #if GENERATING_CFM
  3969. and see what I mean.
  3970.  
  3971. Since all this stuff is static compile time then there's no performance
  3972. hit from it other than the mixed mode stuff itself. 
  3973.  
  3974. Hope this helps.
  3975.  
  3976. --
  3977. ______________________________________________________________________
  3978. David A. G. Gillies                        (daggilli@vader.brad.ac.uk)
  3979.       University of Bradford, Bradford, West Yorkshire, England
  3980. _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  3981.  
  3982. +++++++++++++++++++++++++++
  3983.  
  3984. >From conor@cognet.com.au (Conor MacNeill)
  3985. Date: Tue, 12 Nov 1996 21:44:12 +1100
  3986. Organization: Cognet Pty Limited
  3987.  
  3988. In article <janee-1111961246280001@10.0.2.15>, janee@world.std.com (Jane
  3989. Eisenstein) wrote:
  3990.  
  3991. >In article <328747B3.24D7@vader.brad.ac.uk>, David Gillies
  3992. ><daggilli@vader.brad.ac.uk> wrote:
  3993. >
  3994. >> You simply need to provide a ProcPtr to a FileFilter function (don't
  3995. >> forget the UPP Mixed Mode stuff if you're going to compile for PPC 
  3996. >> and 68K).
  3997. >> 
  3998. >
  3999. >What is "UPP Mixed Mode stuff"?
  4000. >
  4001.  
  4002. This is to handle the case, during a callback from the toolbox to your code,
  4003. where the two pieces of code are using different instruction set architectures
  4004. namely PPC and 68k. The UPP (Universal Procedure Pointer) handles all
  4005. cases performing a mixed-mode switch for the correct architecture, if necessary.
  4006.  
  4007. See Inside Macintosh : PowerPC System Software for more details.
  4008.  
  4009. -- 
  4010. Conor MacNeill
  4011. conor@cognet.com.au
  4012. Cognet Pty Limited
  4013.  
  4014. +++++++++++++++++++++++++++
  4015.  
  4016. >From kjohnson@transparent.com (Kent Johnson)
  4017. Date: Tue, 12 Nov 1996 20:10:07 GMT
  4018. Organization: Transparent Language, Inc.
  4019.  
  4020. In article <amcclain-0911961619520001@206.62.101.63>, amcclain@il-icom.net
  4021. (Andrew McClain) wrote:
  4022.  
  4023. > How do I show only folders in a Standard Get File dialog?
  4024.  
  4025. See the PowerPlant function UStandardFile::GetDirectory() in UStandardFile.cp.
  4026.  
  4027. Kent Johnson                                kjohnson@transparent.com
  4028. Transparent Language, Inc.                http://www.transparent.com
  4029.  
  4030. ---------------------------
  4031.  
  4032. >From jsoltys@woodinville.com (John Soltys)
  4033. Subject: [Q] How can I get a file's creator?
  4034. Date: Wed, 06 Nov 1996 18:45:37 -0800
  4035. Organization: The Edwards Agency
  4036.  
  4037. Once a file has been specified by the user via a StandardGetFile dialog
  4038. how can I see the file's creator? I know I can easily get the file's type
  4039. from the StandardFileReply, but where's the creator stored?
  4040.  
  4041. +++++++++++++++++++++++++++
  4042.  
  4043. >From werdna@cyberjunkie.com (Andrew Wright)
  4044. Date: Thu, 07 Nov 1996 17:19:27 +1000
  4045. Organization: Prentice Centre, University of Queensland
  4046.  
  4047. In article <jsoltys-0611961845370001@ppp-1-45.connect.com>,
  4048. jsoltys@woodinville.com (John Soltys) wrote:
  4049.  
  4050. > Once a file has been specified by the user via a StandardGetFile dialog
  4051. > how can I see the file's creator? I know I can easily get the file's type
  4052. > from the StandardFileReply, but where's the creator stored?
  4053.  
  4054. The call you want is:
  4055. error = GetFInfo(fileName, vRefNum, &fndrInfo);
  4056.  
  4057. where error is an OSErr, fileName is a Str255, vRefNum is a short, and
  4058. fndrInfo is a struct of type FInfo. The field of fndrInfo you want is
  4059. fdCreator. (of type OSType).
  4060.  
  4061. Please don't hesitate to mail if you have any furthur questions.
  4062.  
  4063. -- 
  4064. Regards,               |         Visit me on-line
  4065. Andrew Wright          |                at
  4066. werdna@cyberjunkie.com | http://student.uq.edu.au/~s341797
  4067.  
  4068. +++++++++++++++++++++++++++
  4069.  
  4070. >From at@neuro.psy.soton.ac.uk (Freezer Burn)
  4071. Date: Thu, 07 Nov 1996 18:11:37 +0000
  4072. Organization: Insaneous Noise Systems
  4073.  
  4074. In article <jsoltys-0611961845370001@ppp-1-45.connect.com>,
  4075. jsoltys@woodinville.com (John Soltys) wrote:
  4076.  
  4077. > Once a file has been specified by the user via a StandardGetFile dialog
  4078. > how can I see the file's creator? I know I can easily get the file's type
  4079. > from the StandardFileReply, but where's the creator stored?
  4080.  
  4081. Call the function:
  4082.  
  4083.    iErr = GetFInfo( fileName, vRefNum, &fndrInfo );
  4084.  
  4085. fndrInfo is a pointer to a struct called FInfo. This struct has a field
  4086. with the signature of the creator:
  4087.  
  4088.    fndrInfo->fdCreator
  4089.  
  4090. Check the Inside Macs for more info.
  4091.  
  4092. Chrs,
  4093.  
  4094. Adriaan Tijsseling,
  4095.  
  4096. ______________________________________________________________
  4097.  
  4098. Cognitive Scientist & Mac Guru
  4099.  
  4100. Work:
  4101.    Cognitive Sciences Centre
  4102.    Department of Psychology
  4103.    University of Southampton
  4104.    United Kingdom
  4105.  
  4106. Homepages:
  4107.    work:    http://www.soton.ac.uk/~coglab/coglab
  4108.    life:    http://www.soton.ac.uk/~agt/
  4109.    Sonic:   http://www.soton.ac.uk/~agt/Sonic/
  4110.  
  4111. E-mail:
  4112.    at@neuro.psy.soton.ac.uk
  4113.    at@cogsci.ecs.soton.ac.uk
  4114.    agt@oak.soton.ac.uk
  4115. ______________________________________________________________
  4116.  
  4117. -- 
  4118. <BOLD>procrastinate</BOLD> <ITALIC>v.</ITALIC>
  4119. <BR>
  4120. (<BOLD>-ting</BOLD>) defer action.
  4121. <BR><BR>
  4122. <BOLD>Usage</BOLD> <ITALIC>Procrastinate</ITALIC> is often confused
  4123. with <ITALIC>prevaricate</ITALIC> which means "to be evasive, quibble".
  4124. <BR><BR>
  4125. From: the Oxford Dictionary of Current English
  4126.  
  4127.  
  4128. +++++++++++++++++++++++++++
  4129.  
  4130. >From amcclain@il-icom.net (Andrew McClain)
  4131. Date: Sat, 09 Nov 1996 16:15:07 -0500
  4132. Organization: Illinois Internet Communications, Inc.
  4133.  
  4134. In article <jsoltys-0611961845370001@ppp-1-45.connect.com>,
  4135. jsoltys@woodinville.com (John Soltys) wrote:
  4136.  
  4137. > Once a file has been specified by the user via a StandardGetFile dialog
  4138. > how can I see the file's creator? I know I can easily get the file's type
  4139. > from the StandardFileReply, but where's the creator stored?
  4140.  
  4141. I actually just finished this routine. It's not too hard.
  4142.  
  4143. OSErr MyGetFileCreator (FSSpec *theFile, OSType *creator)
  4144. {
  4145.    OSErr error = noErr;
  4146.    FInfo finderInfo;
  4147.    
  4148. /* get finder info for this file */
  4149.    error = FSpGetFInfo(theFile, &finderInfo);
  4150.    if (error)
  4151.    {
  4152.       return error;
  4153.    }
  4154.    
  4155.    *creator = finderInfo.fdCreator;
  4156.    
  4157.    return error;
  4158. }
  4159.  
  4160. FSpGetFInfo extracts the finder info from the FSSpec thefile. Then, you
  4161. can assign the creator value from the finderInfo structure. FInfo's also
  4162. contain other useful file info, such as SIZE flags and what not. These
  4163. functions are described in Inside Macintosh: Files.
  4164.  
  4165. Hope this helps!
  4166. -Andrew McClain
  4167.  
  4168. ---------------------------
  4169.  
  4170. >From Eric_T._Anholt@pmug.org (Eric T. Anholt)
  4171. Subject: [q] C: putting int into dialog
  4172. Date: 09 Nov 1996 05:36:47 GMT
  4173. Organization: Electric Sheep
  4174.  
  4175. I need help with Think C 5.0.  I have an int that I need to put into a
  4176. "static" in a dialog.  I think I need to convert to a char first, but not
  4177. sure how.  If anyone could help, it would be greatly appreciated.
  4178.  
  4179. +++++++++++++++++++++++++++
  4180.  
  4181. >From "Michael S. Erickson" <mikee@asgsoft.com>
  4182. Date: 9 Nov 1996 21:08:06 GMT
  4183. Organization: Automated Solutions Group
  4184.  
  4185. In article <1312944094.13667288@pmug.org>, Eric_T._Anholt@pmug.org (Eric T.
  4186. Anholt) wrote:
  4187.  
  4188. > I need help with Think C 5.0.  I have an int that I need to put into a
  4189. > "static" in a dialog.  I think I need to convert to a char first, but not
  4190. > sure how.  If anyone could help, it would be greatly appreciated.
  4191.  
  4192. You use the toolbox routine "NumToString"
  4193.  
  4194. Example:
  4195.  
  4196.   int  myInt = 9;
  4197.   Str255 theStr;
  4198.  
  4199.   NumToString(myInt, theStr);
  4200.  
  4201. After the call to NumToString, the variable 'theStr' will contain the value
  4202. in 'myInt'.
  4203.  
  4204.  
  4205.  
  4206. Michael S. Erickson, President
  4207. Automated Solutions Group
  4208.  
  4209. mikee@asgsoft.com    
  4210. http://www.asgsoft.com
  4211.  
  4212.  
  4213. +++++++++++++++++++++++++++
  4214.  
  4215. >From smfr@santafe.edu (Simon Fraser)
  4216. Date: Sat, 09 Nov 1996 23:11:03 -0700
  4217. Organization: Santa Fe Institute
  4218.  
  4219. In article <mikee-0911961312360001@asg.ni.net>, "Michael S. Erickson"
  4220. <mikee@asgsoft.com> wrote:
  4221.  
  4222. > In article <1312944094.13667288@pmug.org>, Eric_T._Anholt@pmug.org (Eric T.
  4223. > Anholt) wrote:
  4224. > > I need help with Think C 5.0.  I have an int that I need to put into a
  4225. > > "static" in a dialog.  I think I need to convert to a char first, but not
  4226. > > sure how.  If anyone could help, it would be greatly appreciated.
  4227. > You use the toolbox routine "NumToString"
  4228. > Example:
  4229. >   int  myInt = 9;
  4230. >   Str255 theStr;
  4231. >   NumToString(myInt, theStr);
  4232.  
  4233. But NumToString expects a long, and you cannot be sure that the
  4234. compiler is not using 2-byte ints.
  4235.  
  4236. One bit of very good advice that I heard here some time ago was to
  4237. avoid ints like the plague, and stick to longs and shorts. That way,
  4238. you can be sure of their size, and your code is more platform-
  4239. and compiler independent.
  4240.  
  4241. Simon
  4242.  
  4243. +++++++++++++++++++++++++++
  4244.  
  4245. >From David Gillies <daggilli@vader.brad.ac.uk>
  4246. Date: Mon, 11 Nov 1996 20:52:14 +0000
  4247. Organization: University of Bradford
  4248.  
  4249. Simon Fraser wrote:
  4250. > In article <mikee-0911961312360001@asg.ni.net>, "Michael S. Erickson"
  4251. > <mikee@asgsoft.com> wrote:
  4252. > > In article <1312944094.13667288@pmug.org>, Eric_T._Anholt@pmug.org (Eric T.
  4253. > > Anholt) wrote:
  4254. > > > I need help with Think C 5.0.  I have an int that I need to put into a
  4255. > > > "static" in a dialog.  I think I need to convert to a char first, but not
  4256. > > > sure how.  If anyone could help, it would be greatly appreciated.
  4257. > >
  4258. > > You use the toolbox routine "NumToString"
  4259. > >
  4260. > > Example:
  4261. > >
  4262. > >   int  myInt = 9;
  4263. > >   Str255 theStr;
  4264. > >
  4265. > >   NumToString(myInt, theStr);
  4266. > But NumToString expects a long, and you cannot be sure that the
  4267. > compiler is not using 2-byte ints.
  4268. > One bit of very good advice that I heard here some time ago was to
  4269. > avoid ints like the plague, and stick to longs and shorts. That way,
  4270. > you can be sure of their size, and your code is more platform-
  4271. > and compiler independent.
  4272. > Simon
  4273.  
  4274. So cast the damn thing to an unsigned long. Sheesh. But why not use
  4275. sprintf
  4276. and then CtoPstr? It's robust, portable, documented and not particularly
  4277. slow. Assuming you aren't using a 68000 you can even do something
  4278. like 
  4279.  
  4280. #include <stdio.h>
  4281. #include <string.h>
  4282.  
  4283. Str255             str;
  4284. int                number=13452;
  4285.  
  4286. sprintf((char*)numStr+1,"%d",number); // this takes care of the zero
  4287.                                       // termination for strlen
  4288. str[0]=strlen((char*)numStr+1);
  4289.  
  4290. The caveat about 68000 is due to potential odd address accesses causing
  4291. and address error. Not a problem on 68020 or higher. The cast to char*
  4292. is because Str255 is 'typedef unsigned char Str255[256]' or summat like
  4293. that.
  4294. -- 
  4295. ______________________________________________________________________
  4296. David A. G. Gillies                        (daggilli@vader.brad.ac.uk)
  4297.       University of Bradford, Bradford, West Yorkshire, England
  4298. _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
  4299.  
  4300. +++++++++++++++++++++++++++
  4301.  
  4302. >From rdwells@mmm.com (Richard Wells)
  4303. Date: Tue, 12 Nov 1996 17:03:58 -0600
  4304. Organization: Imation
  4305.  
  4306. David Gillies wrote:
  4307. > Simon Fraser wrote:
  4308. > >
  4309. > > In article <mikee-0911961312360001@asg.ni.net>, "Michael S. Erickson"
  4310. > > <mikee@asgsoft.com> wrote:
  4311. > >
  4312. > > > In article <1312944094.13667288@pmug.org>, Eric_T._Anholt@pmug.org (Eric T.
  4313. > > > Anholt) wrote:
  4314. > > > > I need help with Think C 5.0.  I have an int that I need to put into a
  4315. > > > > "static" in a dialog.  I think I need to convert to a char first, but not
  4316. > > > > sure how.  If anyone could help, it would be greatly appreciated.
  4317. > > >
  4318. > > > You use the toolbox routine "NumToString"
  4319. > > >
  4320. > > > Example:
  4321. > > >
  4322. > > >   int  myInt = 9;
  4323. > > >   Str255 theStr;
  4324. > > >
  4325. > > >   NumToString(myInt, theStr);
  4326. > >
  4327. > > But NumToString expects a long, and you cannot be sure that the
  4328. > > compiler is not using 2-byte ints.
  4329. > >
  4330. > > One bit of very good advice that I heard here some time ago was to
  4331. > > avoid ints like the plague, and stick to longs and shorts. That way,
  4332. > > you can be sure of their size, and your code is more platform-
  4333. > > and compiler independent.
  4334. > >
  4335. > So cast the damn thing to an unsigned long. Sheesh. But why not use
  4336. > sprintf
  4337. > and then CtoPstr? It's robust, portable, documented and not particularly
  4338. > slow. Assuming you aren't using a 68000 you can even do something
  4339. > like
  4340. > #include <stdio.h>
  4341. > #include <string.h>
  4342. > Str255             str;
  4343. > int                number=13452;
  4344. > sprintf((char*)numStr+1,"%d",number); // this takes care of the zero
  4345. >                                       // termination for strlen
  4346. > str[0]=strlen((char*)numStr+1);
  4347. > The caveat about 68000 is due to potential odd address accesses causing
  4348. > and address error. Not a problem on 68020 or higher. The cast to char*
  4349. > is because Str255 is 'typedef unsigned char Str255[256]' or summat like
  4350. > that.
  4351.  
  4352. At the risk of beating a dead horse, you can make one more improvement
  4353. on this code.  sprintf returns the number of characters written to
  4354. the buffer, so you don't need the call to strlen:
  4355.  
  4356. str[0] = sprintf((char*)numStr+1,"%d",number);
  4357.  
  4358. The real advantage of using sprintf here is that it is much easier
  4359. to form complex strings.  For instance, say your static text needs
  4360. to have the value embedded in other text:
  4361.  
  4362. str[0] = sprintf((char*)numStr+1,"The value is %d.",number);
  4363.  
  4364. Sure, this can be done with NumToString and pstrcat, but why
  4365. bother when you have the tools you need to make the job even
  4366. easier?
  4367.  
  4368. BTW: I don't think there is any need to worry about 68000s getting
  4369. an address error on numStr+1.  Any reasonable implementation of
  4370. sprintf would treat the buffer as a character array, and would
  4371. have no need to have it aligned.  Besides, any implementation
  4372. that would reject the above would be a non-conforming implemenation,
  4373. since the above is perfectly valid C code.
  4374.  
  4375. ---------------------------
  4376.  
  4377. >From han@lava.net (Byron Han)
  4378. Subject: accelerated code resource
  4379. Date: 5 Nov 1996 02:16:02 -1000
  4380. Organization: LavaNet, Inc.
  4381.  
  4382. I am trying to call an accelerated code resource at interrupt time.
  4383. The code resource is a safe fat code resource and has been initially
  4384. called at a safe time to load the code (the safe fat code resource
  4385. also calls SysEnvirons).
  4386.  
  4387. The problem is that the code executes fine when the application
  4388. is still executing.  If the application terminates, when I attempt
  4389. to execute this code, a crash ensues.
  4390.  
  4391. I have loaded the code resource into the system heap; the code is
  4392. locked; any clues?
  4393. -- 
  4394. Byron Han  *  <http://www.hanchenson.com/~han>  *  <mailto:han@hanchenson.com>
  4395. Han Chen & Son - MacOS Software Development * PO Box 61557 * Honolulu HI 96839
  4396. "Windows 95 - Can't Get No Satisfaction"
  4397.  
  4398. +++++++++++++++++++++++++++
  4399.  
  4400. >From mhteas@btech.com (Malcolm H. Teas)
  4401. Date: 5 Nov 1996 14:37:39 GMT
  4402. Organization: Blaze Technology, Inc.
  4403.  
  4404. In article <55nb62$213@malasada.lava.net>
  4405. han@lava.net (Byron Han) writes:
  4406.  
  4407. > ...The problem is that the code executes fine when the application
  4408. > is still executing.  If the application terminates, when I attempt
  4409. > to execute this code, a crash ensues.
  4410. > I have loaded the code resource into the system heap; the code is
  4411. > locked; any clues?
  4412.  
  4413. A couple: Is the application unloading the code resource on exit? 
  4414. (Yes, I know this is the software equivalent of checking to see if the
  4415. power cord is plugged in, but, you know, sometimes the power cord is
  4416. *not* plugged in!)
  4417.  
  4418. Also, and more likely, is the code resource using data that the
  4419. application has in it's global area?
  4420.  
  4421. Install MacsBug (or some other low-level PPC debugger if you'd like)
  4422. and see where the crash is occuring.  You don't say what kind of crash:
  4423. freeze, illegal memory access, illegal instruction, etc.  I find that
  4424. kind of information is very useful starting debugging.
  4425.  
  4426. (Apple Dev. University external faculty: Debugging instructor)
  4427. ____________________________________________________________________
  4428. Malcolm  H. Teas             |   email: mhteas@btech.com
  4429. Blaze Technology, Inc.       |   http://www.btech.com/
  4430. Voice: +1 512 502-9552       |   Fax: +1 512 502-9554
  4431.    ** A Macintosh software development services company  **
  4432. ____________________________________________________________________
  4433.  
  4434. +++++++++++++++++++++++++++
  4435.  
  4436. >From gchapman@irus.rri.uwo.ca (Greg Chapman)
  4437. Date: Thu, 07 Nov 1996 13:46:17 -0500
  4438. Organization: John P. Robarts Research Institute
  4439.  
  4440. In article <55nb62$213@malasada.lava.net>, han@lava.net (Byron Han) wrote:
  4441.  
  4442. > I am trying to call an accelerated code resource at interrupt time.
  4443.  
  4444. What do you mean by 'accelerated'?
  4445.  
  4446. PPC native?
  4447.  
  4448. -- 
  4449. Greg Chapman
  4450. Mac Developer - Robarts Research Institute
  4451. Imaging Research Labs
  4452. - -
  4453. "You! Out of the gene pool!"
  4454.  
  4455. ---------------------------
  4456.  
  4457. >From andi@concentric.net (andi jones)
  4458. Subject: resedit & PICT resources: help?
  4459. Date: 5 Nov 1996 05:47:58 GMT
  4460. Organization: angelwerks
  4461.  
  4462. i am posting this to .games, .tools and .help, hoping someone can give me
  4463. a hand.
  4464.  
  4465. i am trying to learn how to edit (and make) PICT resource files. i have
  4466. resedit (v.2.1.3) and have borrowed two books on the subject, and i have
  4467. had no luck. i am not a programmer, so all i can do is follow instructions
  4468. in the book. they do not work.
  4469.  
  4470. can anyone point me to some decent, detailed instructions on editting and
  4471. making PICT resources? does anyone maintain a FAQ, or have a site on the
  4472. web i can visit? is there a book out there that simply outlines this
  4473. stuff? i don't know if this is complicated to do or not, but i am eager to
  4474. learn. any help anyone can offer would be much appreciated.
  4475.  
  4476. thanks.
  4477.  
  4478.  
  4479.  
  4480.  
  4481.  
  4482. end of line.
  4483.  
  4484. +++++++++++++++++++++++++++
  4485.  
  4486. >From angill@gil.ipswichcity.qld.gov.au (Andrew Gillanders)
  4487. Date: 7 Nov 1996 11:34:11 GMT
  4488. Organization: Wicked Design
  4489.  
  4490. In article <andi-0511960048520001@206.173.7.37>, andi@concentric.net (andi
  4491. jones) wrote:
  4492.  
  4493. > i am posting this to .games, .tools and .help, hoping someone can give me
  4494. > a hand.
  4495. > i am trying to learn how to edit (and make) PICT resource files. i have
  4496. > resedit (v.2.1.3) and have borrowed two books on the subject, and i have
  4497. > had no luck. i am not a programmer, so all i can do is follow instructions
  4498. > in the book. they do not work.
  4499. > can anyone point me to some decent, detailed instructions on editting and
  4500. > making PICT resources? does anyone maintain a FAQ, or have a site on the
  4501. > web i can visit? is there a book out there that simply outlines this
  4502. > stuff? i don't know if this is complicated to do or not, but i am eager to
  4503. > learn. any help anyone can offer would be much appreciated.
  4504. > thanks.
  4505. > end of line.
  4506.  
  4507. I believe editing PICTs in ResEdit is not possible. What I would recommend
  4508. is editing the graphics in a graphics application. Then, copy the graphic
  4509. to the clipboard, switch to ResEdit, create a PICT resource and paste. It
  4510. works for me.
  4511.  
  4512. HTH
  4513. Andrew
  4514.  
  4515. +++++++++++++++++++++++++++
  4516.  
  4517. >From bboppie@aol.com
  4518. Date: 12 Nov 1996 07:16:52 GMT
  4519. Organization: America Online, Inc. (1-800-827-6364) (1.10)
  4520.  
  4521. In ResEdit you create a PICT resource by either selecting PICT from the
  4522. New Resource item in the menu or take the picture into a Paint program, do
  4523. what you what to it, then paste it back into the PICT resource in you
  4524. program. You could do by hex code code but, that's much harder to do.
  4525.  
  4526. BBoppie 
  4527.  
  4528. ---------------------------
  4529.  
  4530. End of C.S.M.P. Digest
  4531. **********************
  4532.